]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
added missing lwm_ratio field to vandelay.merge_profile
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 -->
23
24 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
88                 </fields>
89         </class>
90
91         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
92                 <fields>
93                         <field name="err_msg" oils_persist:virtual="true" />
94                         <field name="type" oils_persist:virtual="true" />
95                 </fields>
96         </class>
97
98         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
99                 <fields>
100                         <field name="err_msg" oils_persist:virtual="true" />
101                         <field name="type" oils_persist:virtual="true" />
102                 </fields>
103         </class>
104
105         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
106                 <fields oils_persist:primary="matchpoint">
107                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
108                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
109                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
110                 </fields>
111                 <links>
112                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
113                 </links>
114         </class>
115
116         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
117         <!-- when the time is right, turn me into a view.  -->
118                 <fields>
119             <field reporter:label="Total Circs" name="num_circs" datatype="int"/>
120             <field reporter:label="Start Time" name="start_time" datatype="timestamp"/>
121             <field reporter:label="Checkout Workstation" name="checkout_workstation" datatype="text"/>
122             <field reporter:label="Last Renewal Time" name="last_renewal_time" datatype="timestamp"/>
123             <field reporter:label="Last Stop Fines" name="last_stop_fines" datatype="text"/>
124             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" datatype="timestamp"/>
125             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" datatype="text"/>
126             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" datatype="text"/>
127             <field reporter:label="Last Checkin Time" name="last_checkin_time" datatype="timestamp"/>
128             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" 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="Owning Library" name="owning_lib" reporter:datatype="int"/>
193                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
194                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
195                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
196                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
197                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
198                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
199                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
200                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
201                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
202                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
203                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
204                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
205                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
206                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
207                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
208                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
209                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
210                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
211                 </fields>
212                 <links>
213                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
214                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
215                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
216                 </links>
217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
218                         <actions>
219                                 <create permission="CREATE_IMPORT_ITEM">
220                     <context link="definition" field="owner"/>
221                                 </create>
222                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
223                     <context link="definition" field="owner"/>
224                                 </retrieve>
225                                 <update permission="UPDATE_IMPORT_ITEM">
226                     <context link="definition" field="owner"/>
227                                 </update>
228                                 <delete permission="DELETE_IMPORT_ITEM">
229                     <context link="definition" field="owner"/>
230                                 </delete>
231                         </actions>
232                 </permacrud>
233         </class>
234
235         <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">
236                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
237                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
238                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
239                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
240                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
241                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
242                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
243                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
244                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
245                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
246                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
247                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
248                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
249                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
250                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
251                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
252                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
253                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
254                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
255                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
256                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
257                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
258                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
259                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
260                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
261                 </fields>
262                 <links>
263                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
264                 </links>
265                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
266                         <actions>
267                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
268                                 <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"/>
269                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
270                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
271                         </actions>
272                 </permacrud>
273         </class>
274
275         <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">
276                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
277                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
278                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
279                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
280                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
281                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
282                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
283                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
284                 </fields>
285                 <links>
286                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
287                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
288                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
289                 </links>
290                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
291                         <actions>
292                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
293                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
294                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
295                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
296                         </actions>
297                 </permacrud>
298         </class>
299
300         <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">
301                 <fields oils_persist:primary="code">
302                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
303                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
304                 </fields>
305                 <links>
306                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
307                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
308                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
309                 </links>
310                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
311                         <actions>
312                                 <retrieve/>
313                         </actions>
314                 </permacrud>
315         </class>
316
317         <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">
318                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
319                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
320                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
321                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
322                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
323                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
324                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
325                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
326                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
327                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
328                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
329                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
330                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
331                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
332                 </fields>
333                 <links>
334                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
335                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
336                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
337                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
338             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
339             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
340             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
341                 </links>
342                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
343                         <actions>
344                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
345                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
346                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
347                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
348                         </actions>
349                 </permacrud>
350         </class>
351
352         <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">
353                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
354                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
355                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
356                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
357                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
358                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
359                 </fields>
360                 <links/>
361                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
362                         <actions>
363                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
364                 <retrieve/>
365                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
366                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
367                         </actions>
368                 </permacrud>
369         </class>
370
371         <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">
372                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
373                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
374                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
375                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
376                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
377                 </fields>
378                 <links>
379                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
380                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
381                 </links>
382                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
383                         <actions>
384                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
385                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
386                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
387                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
388                         </actions>
389                 </permacrud>
390         </class>
391
392         <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">
393                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
394                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
395                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
396                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
397                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
398                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
399                 </fields>
400                 <links>
401                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
402                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
403                 </links>
404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
405                         <actions>
406                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
407                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
408                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
409                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
410                         </actions>
411                 </permacrud>
412         </class>
413
414         <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">
415                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
416                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
417                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
418                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
419                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
420                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
421                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
422                 </fields>
423                 <links>
424                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
425                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
426                 </links>
427                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
428                         <actions>
429                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
430                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
431                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
432                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
433                         </actions>
434                 </permacrud>
435         </class>
436
437         <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">
438                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
439                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
440                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
441                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
442                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
443                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
444                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
445                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
446                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
447                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
448                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
449                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
450                 </fields>
451                 <links>
452                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
453                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
454                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
455             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
456             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
457                 </links>
458                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
459                         <actions>
460                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
461                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
462                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
463                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
464                         </actions>
465                 </permacrud>
466         </class>
467
468         <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">
469                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
470                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
471                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
472                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
473                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
474                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
475                 </fields>
476                 <links/>
477                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
478                         <actions>
479                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
480                 <retrieve/>
481                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
482                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
483                         </actions>
484                 </permacrud>
485         </class>
486
487         <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">
488                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
489                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
490                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
491                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
492                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
493                 </fields>
494                 <links>
495                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
496                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
497                 </links>
498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
499                         <actions>
500                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
501                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
502                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
503                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
504                         </actions>
505                 </permacrud>
506         </class>
507
508         <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">
509                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
510                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
511                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
512                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
513                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
514                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
515                 </fields>
516                 <links>
517                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
518                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
519                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
520                 </links>
521                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
522                         <actions>
523                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
524                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
525                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
526                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
527                         </actions>
528                 </permacrud>
529         </class>
530
531         <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">
532                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
533                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id"/>
534                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
535                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
536                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
537                 </fields>
538                 <links>
539                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
540                 </links>
541                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
542                         <actions>
543                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
544                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
545                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
546                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
547                         </actions>
548                 </permacrud>
549         </class>
550
551         <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">
552                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
553                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
554                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
555                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
556                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
557                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
558                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
559                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
560             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
561                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
562                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
563                 </fields>
564                 <links>
565                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
566                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
567                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
568                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
569                 </links>
570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
571                         <actions>
572                                 <create permission="ADMIN_IMPORT_MATCH_SET">
573                     <context link="match_set" field="owner"/>
574                                 </create>
575                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
576                     <context link="match_set" field="owner"/>
577                                 </retrieve>
578                                 <update permission="ADMIN_IMPORT_MATCH_SET">
579                     <context link="match_set" field="owner"/>
580                                 </update>
581                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
582                     <context link="match_set" field="owner"/>
583                                 </delete>
584                         </actions>
585                 </permacrud>
586         </class>
587
588         <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">
589                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
590                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
591                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
592                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
593                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
594                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
595                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
596                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
597                 </fields>
598                 <links>
599                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
600                 </links>
601                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
602                         <actions>
603                                 <create permission="ADMIN_IMPORT_MATCH_SET">
604                     <context link="match_set" field="owner"/>
605                                 </create>
606                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
607                     <context link="match_set" field="owner"/>
608                                 </retrieve>
609                                 <update permission="ADMIN_IMPORT_MATCH_SET">
610                     <context link="match_set" field="owner"/>
611                                 </update>
612                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
613                     <context link="match_set" field="owner"/>
614                                 </delete>
615                         </actions>
616                 </permacrud>
617         </class>
618
619         <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">
620                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
621                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
622                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
623                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
624                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
625                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
626                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
627                 </fields>
628                 <links>
629                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
630                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
631                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
632                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
633                 </links>
634         </class>
635
636     <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">
637         <fields oils_persist:primary="name">
638             <field reporter:label="Name" name="name" reporter:datatype="text"/>
639             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
640             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
641             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
642         </fields>
643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
644             <actions>
645                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
646                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
647                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
648                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
649             </actions>
650         </permacrud>
651     </class>
652
653     <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">
654         <fields oils_persist:primary="id">
655             <field reporter:label="ID" name="id" reporter:datatype="id"/>
656             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
657             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
658             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
659             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
660         </fields>
661         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
662             <actions>
663                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
664                 <retrieve/>
665                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
666                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
667             </actions>
668         </permacrud>
669     </class>
670
671         <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">
672                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
673                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
674                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
675                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
676                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
677                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
678                 </fields>
679                 <links>
680                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
681                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
682                 </links>
683         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
684             <actions>
685                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
686                 <retrieve/>
687                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
688                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
689             </actions>
690         </permacrud>
691         </class>
692
693         <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">
694                 <fields oils_persist:primary="name">
695                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
696                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
697                         <field reporter:label="Description" name="description" reporter:datatype="text" />
698                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
699                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
700                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
701                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
702                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
703                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
704                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
705                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
706                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
707                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
708                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
709                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
710                 </fields>
711                 <links>
712                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
713                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
714                 </links>
715         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
716             <actions>
717                 <create permission="ADMIN_SVF" global_required="true"/>
718                 <retrieve/>
719                 <update permission="ADMIN_SVF" global_required="true"/>
720                 <delete permission="ADMIN_SVF" global_required="true"/>
721             </actions>
722         </permacrud>
723         </class>
724
725         <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">
726                 <fields oils_persist:primary="id">
727                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
728                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
729                 </fields>
730                 <links>
731                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
732                 </links>
733         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
734             <actions>
735                 <retrieve/>
736             </actions>
737         </permacrud>
738         </class>
739
740         <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">
741                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
742                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
743                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
744                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
745                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
746                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
747                 </fields>
748                 <links>
749                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
750                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
751                 </links>
752         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
753             <actions>
754                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
755                 <retrieve/>
756                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
757                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
758             </actions>
759         </permacrud>
760         </class>
761
762         <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">
763                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
764                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
765                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
766                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
767                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
768                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
769                 </fields>
770                 <links>
771                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
772                 </links>
773         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
774             <actions>
775                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
776                 <retrieve/>
777                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
778                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
779             </actions>
780         </permacrud>
781         </class>
782
783         <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">
784                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
785                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
786                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
787                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
788                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
789                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
790                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
791                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
792                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
793                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
794                 </fields>
795                 <links>
796                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
797                 </links>
798         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
799             <actions>
800                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
801                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
802                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
803                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
804             </actions>
805         </permacrud>
806         </class>
807
808     <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">
809         <fields oils_persist:primary="name">
810             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
811             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
812             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
813             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
814             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
815             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
816             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
817             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
818             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
819         </fields>
820         <links>
821             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
822         </links>
823         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
824             <actions>
825                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
826                 <retrieve/>
827                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
828                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
829             </actions>
830         </permacrud>
831     </class>
832
833     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
834         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
835             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
836             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
837             <field reporter:label="Name" name="name" reporter:datatype="text"/>
838             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
839             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
840             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
841             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
842         </fields>
843         <links>
844             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
845         </links>
846     </class>
847
848         <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">
849                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
850                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
851                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
852                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
853                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
854                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
855                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
856                 </fields>
857                 <links>
858             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
859             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
860                 </links>
861                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
862                         <actions>
863                                 <retrieve/>
864                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
865                         </actions>
866                 </permacrud>
867         </class>
868
869         <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">
870                 <fields oils_persist:primary="key">
871                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
872                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
873                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
874                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
875                 </fields>
876                 <links/>
877                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
878                         <actions>
879                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
880                                 <retrieve/>
881                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
882                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
883                         </actions>
884                 </permacrud>
885         </class>
886
887         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
888                 <fields oils_persist:primary="module">
889                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
890                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
891                 </fields>
892                 <links/>
893         </class>
894
895         <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">
896                 <fields oils_persist:primary="module">
897                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
898                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
899                 </fields>
900                 <links/>
901                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
902                         <actions>
903                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
904                                 <retrieve/>
905                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
906                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
907                         </actions>
908                 </permacrud>
909         </class>
910
911         <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">
912                 <fields oils_persist:primary="module">
913                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
914                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
915                 </fields>
916                 <links/>
917                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
918                         <actions>
919                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
920                                 <retrieve/>
921                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
922                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
923                         </actions>
924                 </permacrud>
925         </class>
926
927         <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">
928                 <fields oils_persist:primary="module">
929                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
930                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
931                 </fields>
932                 <links/>
933                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
934                         <actions>
935                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
936                                 <retrieve/>
937                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
938                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
939                         </actions>
940                 </permacrud>
941         </class>
942
943         <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">
944                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
945                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
946                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
947                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
948                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
949                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
950                 </fields>
951                 <links>
952                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
953                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
954                 </links>
955                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
956                         <actions>
957                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
958                     <context link="event_def" field="owner"/>
959                 </create>
960                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
961                     <context link="event_def" field="owner"/>
962                 </retrieve>
963                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
964                     <context link="event_def" field="owner"/>
965                 </update>
966                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
967                     <context link="event_def" field="owner"/>
968                 </delete>
969                         </actions>
970                 </permacrud>
971         </class>
972
973         <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">
974                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
975                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
976                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
977                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
978                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
979                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
980                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
981                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
982                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
983                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
984                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
985                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
986                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
987                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
988                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
989                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
990                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
991                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
992                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
993                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
994                 </fields>
995                 <links>
996                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
997                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
998                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
999                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1000                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1001                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1002                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1003                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1004                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1005                 </links>
1006                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1007                         <actions>
1008                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1009                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1010                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1011                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1012                         </actions>
1013                 </permacrud>
1014         </class>
1015
1016         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1017                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1018                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1019                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1020                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1021                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1022                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1023                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1024                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1025                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1026                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1027                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1028                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1029                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1030                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1031                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1032                 </fields>
1033                 <links>
1034                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1035                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1036                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1037                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1038                 </links>
1039         </class>
1040
1041         <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">
1042                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1043                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1044                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1045                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1046                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1047                 </fields>
1048                 <links>
1049                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1050                 </links>
1051                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1052                         <actions>
1053                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1054                     <context link="event_def" field="owner"/>
1055                 </create>
1056                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1057                     <context link="event_def" field="owner"/>
1058                 </retrieve>
1059                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1060                     <context link="event_def" field="owner"/>
1061                 </update>
1062                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1063                     <context link="event_def" field="owner"/>
1064                 </delete>
1065                         </actions>
1066                 </permacrud>
1067         </class>
1068
1069         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1070                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1071                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1072                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1073                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1074                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1075                 </fields>
1076                 <links>
1077                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1078                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1079                 </links>
1080         </class>
1081
1082         <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">
1083                 <fields oils_persist:primary="code">
1084                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1085                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1086                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1087                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1088                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1089                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1090                 </fields>
1091                 <links/>
1092         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1093             <actions>
1094                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1095                 <retrieve/>
1096                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1097                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1098             </actions>
1099         </permacrud>
1100         </class>
1101
1102         <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">
1103                 <fields oils_persist:primary="code">
1104                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1105                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1106                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1107                 </fields>
1108                 <links/>
1109         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1110             <actions>
1111                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1112                 <retrieve/>
1113                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1114                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1115             </actions>
1116         </permacrud>
1117         </class>
1118
1119         <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">
1120                 <fields oils_persist:primary="code">
1121                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1122                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1123                 </fields>
1124                 <links/>
1125         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1126             <actions>
1127                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1128                 <retrieve/>
1129                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1130                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1131             </actions>
1132         </permacrud>
1133         </class>
1134
1135         <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">
1136                 <fields oils_persist:primary="code">
1137                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1138                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1139                 </fields>
1140                 <links/>
1141         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1142             <actions>
1143                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1144                 <retrieve/>
1145                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1146                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1147             </actions>
1148         </permacrud>
1149         </class>
1150
1151         <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">
1152                 <fields oils_persist:primary="code">
1153                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1154                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1155                 </fields>
1156                 <links/>
1157         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1158             <actions>
1159                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1160                 <retrieve/>
1161                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1162                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1163             </actions>
1164         </permacrud>
1165         </class>
1166
1167         <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">
1168                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1169                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1170                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1171                 </fields>
1172                 <links/>
1173         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1174             <actions>
1175                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1176                 <retrieve/>
1177                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1178                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1179             </actions>
1180         </permacrud>
1181         </class>
1182
1183         <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">
1184                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1185                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1186                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1187                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1188                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1189                 </fields>
1190         <links>
1191             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1192             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1193             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1194         </links>
1195         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1196             <actions>
1197                 <create permission="UPDATE_COPY">
1198                     <context link="target_copy" field="circ_lib"/>
1199                 </create>
1200                 <retrieve/>
1201                 <update permission="UPDATE_COPY">
1202                     <context link="target_copy" field="circ_lib"/>
1203                 </update>
1204                 <delete permission="UPDATE_COPY">
1205                     <context link="target_copy" field="circ_lib"/>
1206                 </delete>
1207             </actions>
1208         </permacrud>
1209         </class>
1210
1211         <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">
1212                 <fields oils_persist:primary="code">
1213                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1214                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1215                 </fields>
1216                 <links/>
1217         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1218             <actions>
1219                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1220                 <retrieve/>
1221                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1222                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1223             </actions>
1224         </permacrud>
1225         </class>
1226
1227         <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">
1228                 <fields oils_persist:primary="code">
1229                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1230                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1231                 </fields>
1232                 <links/>
1233         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1234             <actions>
1235                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1236                 <retrieve/>
1237                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1238                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1239             </actions>
1240         </permacrud>
1241         </class>
1242
1243         <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">
1244                 <fields oils_persist:primary="code">
1245                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1246                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1247                 </fields>
1248                 <links/>
1249         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1250             <actions>
1251                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1252                 <retrieve/>
1253                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1254                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1255             </actions>
1256         </permacrud>
1257         </class>
1258
1259     <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">
1260         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1261             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1262             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1263             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1264             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1265             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1266             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1267             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1268             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1269             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1270             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1271             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1272             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1273             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1274             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1275             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1276         </fields>
1277         <links/>
1278         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1279             <actions>
1280                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1281                 <retrieve/>
1282                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1283                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1284             </actions>
1285         </permacrud>
1286     </class>
1287
1288     <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">
1289         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1290             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1291             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1292             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1293             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1294             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1295             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1296             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1297             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1298             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1299             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1300             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1301             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1302             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1303             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1304             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1305         </fields>
1306         <links/>
1307         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1308             <actions>
1309                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1310                 <retrieve/>
1311                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1312                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1313             </actions>
1314         </permacrud>
1315     </class>
1316
1317     <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">
1318         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1319             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1320             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1321             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1322             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1323             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1324         </fields>
1325         <links>
1326             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1327             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1328             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1329         </links>
1330         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1331             <actions>
1332                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1333                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1334                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1335                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1336             </actions>
1337         </permacrud>
1338     </class>
1339
1340         <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">
1341                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1342                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1343                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1344                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1345                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1346                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1347                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1348                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1349                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1350                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1351                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1352                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1353                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1354                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1355                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1356                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1357                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1358             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1359                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1360                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1361                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1362                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1363                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1364                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1365                 </fields>
1366                 <links>
1367                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1368                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1369                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1370                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1371                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1372                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1373                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1374                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1375                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1376                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1377                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1378                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1379                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1380             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1381                 </links>
1382         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1383             <actions>
1384                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1385                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1386                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1387                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1388             </actions>
1389         </permacrud>
1390         </class>
1391
1392         <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">
1393                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1394                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1395                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1396                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1397                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1398                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1399                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1400                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1401                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1402                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1403                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1404                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1405                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1406                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1407                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1408             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1409                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1410                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1411             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1412                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1413                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1414                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1415                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1416             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1417             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1418             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1419                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1420                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1421                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1422                 </fields>
1423                 <links>
1424                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1425                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1426                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1427                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1428                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1429                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1430                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1431                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1432                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1433                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1434                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1435                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1436                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1437             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1438                 </links>
1439         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1440             <actions>
1441                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1442                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1443                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1444                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1445             </actions>
1446         </permacrud>
1447         </class>
1448
1449         <class id="ccmcmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test" oils_persist:tablename="config.circ_matrix_circ_mod_test" reporter:label="Circulation Matrix Circulation Modifier Subtest">
1450                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1451                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1452                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1453                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1454                 </fields>
1455                 <links>
1456                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1457                 </links>
1458         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1459             <actions>
1460                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1461                     <context link="matchpoint" field="org_unit"/>
1462                 </create>
1463                 <retrieve/>
1464                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1465                     <context link="matchpoint" field="org_unit"/>
1466                 </update>
1467                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1468                     <context link="matchpoint" field="org_unit"/>
1469                 </delete>
1470             </actions>
1471         </permacrud>
1472         </class>
1473
1474         <class id="ccmcmtm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test_map" oils_persist:tablename="config.circ_matrix_circ_mod_test_map" reporter:label="Circulation Matrix Circulation Modifier Subtest Circulation Modifier Set">
1475                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1476                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1477                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1478                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1479                 </fields>
1480                 <links>
1481                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1482                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1483                 </links>
1484         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1485             <actions>
1486                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1487                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1488                 </create>
1489                 <retrieve/>
1490                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1491                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1492                 </update>
1493                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1494                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1495                 </delete>
1496             </actions>
1497         </permacrud>
1498         </class>
1499
1500         <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">
1501                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1502                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1503                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1504                 </fields>
1505                 <links/>
1506         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1507             <actions>
1508                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1509                 <retrieve/>
1510                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1511                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1512             </actions>
1513         </permacrud>
1514         </class>
1515
1516         <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">
1517                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1518                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1519                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1520                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1521                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1522                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1523                 </fields>
1524                 <links>
1525                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1526                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1527                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1528                 </links>
1529         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1530             <actions>
1531                 <create permission="ADMIN_SURVEY">
1532                     <context link="survey" field="owner"/>
1533                 </create>
1534                 <retrieve/>
1535                 <update permission="ADMIN_SURVEY">
1536                     <context link="survey" field="owner"/>
1537                 </update>
1538                 <delete permission="ADMIN_SURVEY">
1539                     <context link="survey" field="owner"/>
1540                 </delete>
1541             </actions>
1542         </permacrud>
1543         </class>
1544         <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">
1545                 <fields oils_persist:primary="id" oils_persist:sequence="">
1546                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1547                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1548                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1549                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1550                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1551                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1552                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1553                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1554                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1555                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1556                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1557                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1558                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1559                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1560                 </fields>
1561                 <links>
1562                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1563                 </links>
1564         </class>
1565         <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">
1566                 <fields oils_persist:primary="id" oils_persist:sequence="">
1567                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1568                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1569                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1570                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1571                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1572                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1573                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1574                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1575                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1576                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1577                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1578                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1579                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1580                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1581                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1582                 </fields>
1583                 <links>
1584                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1585                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1586                 </links>
1587         </class>
1588         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1589                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1590                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1591                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1592                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1593                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1594                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1595                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1596                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1597                 </fields>
1598                 <links>
1599                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1600                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1601                 </links>
1602         </class>
1603         <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">
1604                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1605                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1606                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1607                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1608                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1609                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1610                 </fields>
1611                 <links>
1612                         <link field="usr" reltype="has_a" key="id" class="au"/>
1613                 </links>
1614         </class>
1615         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1616                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1617                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1618                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1619                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1620                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1621                 </fields>
1622                 <links>
1623                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1624                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1625                 </links>
1626         </class>
1627         <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">
1628                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1629                         <field name="field" reporter:datatype="link"/>
1630                         <field name="id" reporter:datatype="id" />
1631                         <field name="source" reporter:datatype="link"/>
1632                         <field name="value" reporter:datatype="text"/>
1633                 </fields>
1634                 <links>
1635                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1636                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1637                 </links>
1638         </class>
1639         <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">
1640                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1641                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1642                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1643                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1644                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1645                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1646                 </fields>
1647                 <links>
1648                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1649                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1650                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1651                 </links>
1652         </class>
1653         <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">
1654                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1655                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1656                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1657                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1658                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1659                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1660                 </fields>
1661                 <links>
1662                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1663                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1664                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1665                 </links>
1666         </class>
1667         <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">
1668                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1669                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1670                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1671                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1672                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1673                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1674                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1675                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1676                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1677                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1678                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1679                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1680                 </fields>
1681                 <links>
1682                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1683                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1684                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1685                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1686                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1687                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1688                 </links>
1689         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1690             <actions>
1691                 <create permission="TRANSIT_COPY" context_field="owner">
1692                     <context link="target_copy" field="circ_lib"/>
1693                 </create>
1694                 <retrieve/>
1695                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1696                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1697             </actions>
1698         </permacrud>
1699         </class>
1700         <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">
1701                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1702                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1703                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1704                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1705                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1706                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1707                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1708                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1709                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1710                 </fields>
1711                 <links>
1712                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1713                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1714                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1715                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1716                 </links>
1717         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1718             <actions>
1719                 <create permission="ADMIN_SURVEY">
1720                     <context link="survey" field="owner"/>
1721                 </create>
1722                 <retrieve/>
1723                 <update permission="ADMIN_SURVEY">
1724                     <context link="survey" field="owner"/>
1725                 </update>
1726                 <delete permission="ADMIN_SURVEY">
1727                     <context link="survey" field="owner"/>
1728                 </delete>
1729             </actions>
1730         </permacrud>
1731         </class>
1732         <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">
1733                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1734                         <field name="bucket" />
1735                         <field name="id" reporter:datatype="id" />
1736                         <field name="target_copy" reporter:datatype="link"/>
1737                         <field name="create_time" reporter:datatype="timestamp" />
1738                         <field name="pos" reporter:datatype="int" />
1739                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1740                 </fields>
1741                 <links>
1742                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1743                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1744             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1745                 </links>
1746         </class>
1747         <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">
1748                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1749                         <field name="id" reporter:datatype="id" />
1750                         <field name="item" reporter:datatype="link"/>
1751                         <field name="note" reporter:datatype="text" />
1752                 </fields>
1753                 <links>
1754                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1755                 </links>
1756         </class>
1757         <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">
1758                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1759                         <field name="active" reporter:datatype="bool"/>
1760                         <field name="create_date" reporter:datatype="timestamp"/>
1761                         <field name="creator" />
1762                         <field name="deleted" reporter:datatype="bool"/>
1763                         <field name="edit_date" reporter:datatype="timestamp"/>
1764                         <field name="editor" />
1765                         <field name="id" reporter:datatype="id" />
1766                         <field name="last_xact_id" />
1767                         <field name="marc" />
1768                         <field name="source" />
1769                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1770                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1771                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1772                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
1773                 </fields>
1774                 <links>
1775                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1776                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1777                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1778                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1779                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
1780                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1781                 </links>
1782                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1783                         <actions>
1784                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1785                                 <retrieve/>
1786                                 <update permission="UPDATE_MARC" global_required="true"/>
1787                                 <delete permission="UPDATE_MARC" global_required="true"/>
1788                         </actions>
1789                 </permacrud>
1790         </class>
1791         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1792                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1793                         <field name="char_encoding" />
1794                         <field name="id" />
1795                         <field name="record" />
1796                         <field name="record_status" />
1797                 </fields>
1798                 <links>
1799                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1800                 </links>
1801         </class>
1802         <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">
1803                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
1804                         <field name="id" reporter:datatype="id" />
1805                         <field name="bib" reporter:datatype="link" />
1806                         <field name="authority" reporter:datatype="link" />
1807                 </fields>
1808                 <links>
1809                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
1810                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
1811                 </links>
1812         </class>
1813         <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">
1814                 <fields oils_persist:primary="code" oils_persist:sequence="">
1815                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1816                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1817                 </fields>
1818                 <links/>
1819         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1820             <actions>
1821                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1822                 <retrieve/>
1823                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1824                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1825             </actions>
1826         </permacrud>
1827         </class>
1828         <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">
1829                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1830                         <field name="accepting_usr" />
1831                         <field name="amount" reporter:datatype="money" />
1832                         <field name="amount_collected" reporter:datatype="money" />
1833                         <field name="approval_code" reporter:datatype="text"/>
1834                         <field name="cash_drawer" reporter:datatype="link"/>
1835                         <field name="cc_first_name" reporter:datatype="text"/>
1836                         <field name="cc_last_name" reporter:datatype="text"/>
1837                         <field name="cc_number" reporter:datatype="text"/>
1838                         <field name="cc_order_number" reporter:datatype="text"/>
1839                         <field name="cc_type" reporter:datatype="text"/>
1840                         <field name="cc_processor" reporter:datatype="text"/>
1841                         <field name="expire_month" reporter:datatype="int" />
1842                         <field name="expire_year" reporter:datatype="int" />
1843                         <field name="id" reporter:datatype="id" />
1844                         <field name="note" reporter:datatype="text"/>
1845                         <field name="payment_ts" reporter:datatype="timestamp"/>
1846                         <field name="xact" reporter:datatype="link"/>
1847                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1848                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1849                 </fields>
1850                 <links>
1851                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1852                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1853                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1854                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1855                 </links>
1856         </class>
1857         <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">
1858                 <fields oils_persist:primary="name">
1859                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1860                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1861                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1862                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1863                 </fields>
1864                 <links/>
1865         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1866             <actions>
1867                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1868                 <retrieve/>
1869                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1870                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1871             </actions>
1872         </permacrud>
1873         </class>
1874
1875         <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">
1876                 <fields oils_persist:primary="alias">
1877                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
1878                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1879                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
1880                 </fields>
1881                 <links>
1882                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1883                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1884                 </links>
1885         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1886             <actions>
1887                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1888                 <retrieve/>
1889                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1890                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
1891             </actions>
1892         </permacrud>
1893         </class>
1894
1895         <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">
1896                 <fields oils_persist:primary="name">
1897                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1898                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1899                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1900                 </fields>
1901                 <links>
1902                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
1903                 </links>
1904         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1905             <actions>
1906                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
1907                 <retrieve/>
1908                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
1909                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
1910             </actions>
1911         </permacrud>
1912         </class>
1913
1914         <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">
1915                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1916                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1917                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1918                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1919                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1920                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1921                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
1922                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1923                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
1924                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
1925                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
1926                 </fields>
1927                 <links>
1928                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1929                 </links>
1930         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1931             <actions>
1932                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1933                 <retrieve/>
1934                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1935                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1936             </actions>
1937         </permacrud>
1938         </class>
1939         <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">
1940                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
1941                         <field name="id" reporter:datatype="id" />
1942                         <field name="name" reporter:datatype="text"/>
1943                         <field name="xpath" reporter:datatype="text"/>
1944                         <field name="format" reporter:datatype="link"/>
1945                         <field name="first_word" reporter:datatype="bool" />
1946                 </fields>
1947                 <links/>
1948         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1949             <actions>
1950                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
1951                 <retrieve/>
1952                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
1953                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
1954             </actions>
1955         </permacrud>
1956         </class>
1957         <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">
1958                 <fields oils_persist:primary="code" oils_persist:sequence="">
1959                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1960                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1961                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1962                 </fields>
1963                 <links/>
1964         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1965             <actions>
1966                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1967                 <retrieve/>
1968                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1969                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1970             </actions>
1971         </permacrud>
1972         </class>
1973         <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">
1974                 <fields oils_persist:primary="code" oils_persist:sequence="">
1975                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1976                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1977                 </fields>
1978                 <links/>
1979         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1980             <actions>
1981                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1982                 <retrieve/>
1983                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1984                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1985             </actions>
1986         </permacrud>
1987         </class>
1988     <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">
1989         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
1990             <field reporter:label="Call number class ID" name="id" reporter_datatype="id"/>
1991             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1992             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
1993             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
1994         </fields>
1995         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1996             <actions>
1997                 <retrieve/>
1998             </actions>
1999         </permacrud>
2000     </class>
2001         <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">
2002                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2003                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2004                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2005                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2006                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2007                 </fields>
2008                 <links>
2009                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2010                 </links>
2011         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2012             <actions>
2013                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2014                 <retrieve/>
2015                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2016                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2017             </actions>
2018         </permacrud>
2019         </class>
2020         <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">
2021                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2022                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2023                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2024                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2025                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2026                 </fields>
2027                 <links>
2028                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2029                 </links>
2030         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2031             <actions>
2032                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2033                 <retrieve/>
2034                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2035                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2036             </actions>
2037         </permacrud>
2038         </class>
2039         <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">
2040                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2041                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2042                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2043                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2044                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2045                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2046                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2047                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2048                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2049                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2050                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2051                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2052                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2053                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2054                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
2055                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2056                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2057                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2058                 </fields>
2059                 <links>
2060                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2061                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2062                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2063                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2064                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2065                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2066                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2067                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2068                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2069                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2070                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2071                 </links>
2072         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2073             <actions>
2074                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2075                 <retrieve/>
2076                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2077                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2078             </actions>
2079         </permacrud>
2080         </class>
2081         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2082                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2083                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2084                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2085                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2086                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2087                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2088                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2089                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2090                 </fields>
2091                 <links>
2092                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2093                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2094         </links>
2095         </class>
2096         <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">
2097                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2098                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2099                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2100                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2101                 </fields>
2102                 <links>
2103                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2104                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2105                 </links>
2106         </class>
2107         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2108                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2109                         <field name="id" reporter:datatype="id" />
2110                         <field name="value" oils_persist:i18n="true" />
2111                 </fields>
2112                 <links/>
2113         </class>
2114         <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">
2115                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2116                         <field name="balance_owed" reporter:datatype="money" />
2117                         <field name="total_owed" reporter:datatype="money" />
2118                         <field name="total_paid" reporter:datatype="money" />
2119                         <field name="usr" reporter:datatype="link"/>
2120                 </fields>
2121                 <links>
2122                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2123         </links>
2124         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2125             <actions>
2126                 <retrieve permission="VIEW_USER">
2127                     <context link="usr" field="home_ou"/>
2128                 </retrieve>
2129             </actions>
2130         </permacrud>
2131         </class>
2132         <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">
2133                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2134                         <field name="collector" />
2135                         <field name="enter_time" reporter:datatype="timestamp"/>
2136                         <field name="id" reporter:datatype="id" />
2137                         <field name="location" reporter:datatype="link"/>
2138                         <field name="usr" reporter:datatype="link"/>
2139                 </fields>
2140                 <links>
2141                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2142                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2143                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2144                 </links>
2145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2146             <actions>
2147                 <create permission="money.collections_tracker.create" context_field="location"/>
2148                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2149                 <delete permission="money.collections_tracker.create" context_field="location"/>
2150             </actions>
2151         </permacrud>
2152         </class>
2153         <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">
2154                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2155                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2156                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2157                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2158                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2159                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2160                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2161                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2162                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2163                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2164                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2165                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2166                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2167                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2168                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2169                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2170                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2171                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2172                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2173                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2174                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2175                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2176                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2177                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2178                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2179                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2180                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2181                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2182                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2183                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2184                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2185                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2186                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2187                 </fields>
2188                 <links>
2189                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2190                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2191                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2192                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2193                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2194                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2195                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2196                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2197                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2198                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2199                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2200                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2201                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2202                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2203                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2204                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2205                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2206                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2207                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2208                 </links>
2209         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2210             <actions>
2211                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2212                 <retrieve/>
2213                 <update permission="UPDATE_MARC" global_required="true"/>
2214             </actions>
2215         </permacrud>
2216         </class>
2217         <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">
2218                 <fields oils_persist:primary="id">
2219                         <field name="dow_0_close" />
2220                         <field name="dow_0_open" />
2221                         <field name="dow_1_close" />
2222                         <field name="dow_1_open" />
2223                         <field name="dow_2_close" />
2224                         <field name="dow_2_open" />
2225                         <field name="dow_3_close" />
2226                         <field name="dow_3_open" />
2227                         <field name="dow_4_close" />
2228                         <field name="dow_4_open" />
2229                         <field name="dow_5_close" />
2230                         <field name="dow_5_open" />
2231                         <field name="dow_6_close" />
2232                         <field name="dow_6_open" />
2233                         <field name="id" reporter:datatype="id" />
2234                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2235                 </fields>
2236                 <links>
2237                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2238                 </links>
2239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2240             <actions>
2241                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2242                 <retrieve/>
2243                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2244                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2245             </actions>
2246         </permacrud>
2247         </class>
2248         <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">
2249                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2250                         <field name="id" reporter:datatype="id" />
2251                         <field name="record" reporter:datatype="link"/>
2252                         <field name="label" reporter:datatype="text"/>
2253                         <field name="label_sortkey" reporter:datatype="text"/>
2254                 </fields>
2255                 <links>
2256                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2257                 </links>
2258         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2259             <actions>
2260                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2261                 <retrieve/>
2262                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2263                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2264             </actions>
2265         </permacrud>
2266         </class>
2267         <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">
2268                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2269                         <field name="id" reporter:datatype="id" />
2270                         <field name="target_copy" reporter:datatype="link" />
2271                         <field name="part" reporter:datatype="link"/>
2272                 </fields>
2273                 <links>
2274                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2275                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2276                 </links>
2277         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2278             <actions>
2279                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2280                 <retrieve/>
2281                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2282                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2283             </actions>
2284         </permacrud>
2285         </class>
2286         <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">
2287                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2288                         <field name="close_end" reporter:datatype="timestamp" />
2289                         <field name="close_start" reporter:datatype="timestamp" />
2290                         <field name="id" reporter:datatype="id" />
2291                         <field name="org_unit" reporter:datatype="org_unit"/>
2292                         <field name="reason" reporter:datatype="text"/>
2293                 </fields>
2294                 <links>
2295                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2296                 </links>
2297         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2298             <actions>
2299                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2300                 <retrieve/>
2301                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2302                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2303             </actions>
2304         </permacrud>
2305         </class>
2306         <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">
2307                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2308                         <field name="extended" reporter:datatype="interval"/>
2309                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2310                         <field name="max_renewals" reporter:datatype="int" />
2311                         <field name="name" reporter:datatype="text"/>
2312                         <field name="normal" reporter:datatype="interval"/>
2313                         <field name="shrt" reporter:datatype="interval"/>
2314                 </fields>
2315                 <links>
2316                 </links>
2317         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2318             <actions>
2319                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2320                 <retrieve/>
2321                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2322                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2323             </actions>
2324         </permacrud>
2325         </class>
2326
2327         <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">
2328                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2329                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2330                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2331             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2332                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2333             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2334                 </fields>
2335                 <links>
2336             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2337                 </links>
2338                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2339             <actions>
2340                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2341                 <retrieve/>
2342                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2343                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2344             </actions>
2345                 </permacrud>
2346         </class>
2347
2348         <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">
2349                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2350                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2351                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2352                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2353             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2354                 </fields>
2355                 <links>
2356                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2357                 </links>
2358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2359             <actions>
2360                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2361                 <retrieve/>
2362                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2363                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2364             </actions>
2365                 </permacrud>
2366         </class>
2367
2368         <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">
2369                 <fields oils_persist:primary="id" oils_persist:sequence="">
2370                         <field name="balance_owed" reporter:datatype="money"/>
2371                         <field name="id" reporter:datatype="id" />
2372                         <field name="last_billing_note" reporter:datatype="text"/>
2373                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2374                         <field name="last_billing_type" reporter:datatype="text"/>
2375                         <field name="last_payment_note" reporter:datatype="text"/>
2376                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2377                         <field name="last_payment_type" reporter:datatype="text"/>
2378                         <field name="total_owed" reporter:datatype="money"/>
2379                         <field name="total_paid" reporter:datatype="money"/>
2380                         <field name="usr" reporter:datatype="link"/>
2381                         <field name="xact_finish" reporter:datatype="timestamp" />
2382                         <field name="xact_start" reporter:datatype="timestamp" />
2383                         <field name="xact_type" reporter:datatype="text"/>
2384                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2385                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2386                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2387                         <field name="billing_location" reporter:datatype="link"/>
2388                 </fields>
2389                 <links>
2390                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2391                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2392                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2393                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2394                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2395                 </links>
2396         </class>
2397         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2398                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2399                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2400                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2401                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2402                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2403                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2404                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2405                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2406                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2407                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2408                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2409                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2410                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2411                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2412                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2413                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2414                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2415                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2416                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2417                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2418                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2419                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2420                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2421                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2422                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2423                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2424                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2425                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2426                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2427                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2428                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2429                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2430                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2431                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2432                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2433                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2434                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2435                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2436                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2437                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2438                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2439                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2440                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2441                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2442                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2443                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2444                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2445                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2446                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2447                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2448                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2449                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2450                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2451                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2452                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2453                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2454                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2455                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2456                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2457                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2458                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2459                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2460                 </fields>
2461                 <links>
2462                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2463                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2464                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2465                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2466                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2467                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2468                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2469                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2470                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2471                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2472                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2473                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2474                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2475                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2476                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2477                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2478                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2479                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2480                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2481                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2482                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2483                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2484                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2485                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2486                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2487                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2488                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2489                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2490                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2491                 </links>
2492         </class>
2493
2494         <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">
2495                 <fields oils_persist:primary="name">
2496                         <field name="name" reporter:datatype="text"/>
2497                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2498                 </fields>
2499                 <links/>
2500                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2501                         <actions>
2502                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2503                                 <retrieve/>
2504                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2505                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2506                         </actions>
2507                 </permacrud>
2508         </class>
2509         <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">
2510                 <fields oils_persist:primary="name">
2511                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2512                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2513                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2514                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2515                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2516                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2517                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2518                 </fields>
2519                 <links>
2520                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2521                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2522                 </links>
2523                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2524                         <actions>
2525                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2526                                 <retrieve/>
2527                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2528                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2529                         </actions>
2530                 </permacrud>
2531         </class>
2532         <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">
2533                 <fields oils_persist:primary="name">
2534                         <field name="name" reporter:datatype="text"/>
2535                         <field name="label" reporter:datatype="text"/>
2536                         <field name="description" reporter:datatype="text"/>
2537                         <field name="datatype" reporter:datatype="text"/>
2538                         <field name="view_perm" reporter:datatype="link"/>
2539                         <field name="update_perm" reporter:datatype="link"/>
2540                         <field name="fm_class" reporter:datatype="text"/>
2541                         <field name="grp" reporter:datatype="link"/>
2542                 </fields>
2543                 <links>
2544                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2545                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2546                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2547                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2548                 </links>
2549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2550                         <actions>
2551                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2552                                 <retrieve/>
2553                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2554                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2555                         </actions>
2556                 </permacrud>
2557         </class>
2558         <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">
2559                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2560                         <field name="id" />
2561                         <field name="name"  reporter:datatype="text"/>
2562                         <field name="org_unit" reporter:datatype="org_unit"/>
2563                         <field name="value"  reporter:datatype="text"/>
2564                 </fields>
2565                 <links>
2566                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2567                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2568                 </links>
2569         </class>
2570         <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">
2571                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2572                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2573                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2574                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2575                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2576                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2577                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2578                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2579                 </fields>
2580                 <links>
2581                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2582                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2583                 </links>
2584         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2585             <actions>
2586                 <create permission="CREATE_COPY_NOTE">
2587                     <context link="owning_copy" field="circ_lib"/>
2588                 </create>
2589                 <retrieve permission="VIEW_COPY_NOTES">
2590                     <context link="owning_copy" field="circ_lib"/>
2591                 </retrieve>
2592                 <update permission="UPDATE_COPY_NOTE">
2593                     <context link="owning_copy" field="circ_lib"/>
2594                 </update>
2595                 <delete permission="DELETE_COPY_NOTE">
2596                     <context link="owning_copy" field="circ_lib"/>
2597                 </delete>
2598             </actions>
2599         </permacrud>
2600         </class>
2601         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2602                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2603                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2604                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2605                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2606                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2607                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2608                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2609                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2610                 </fields>
2611                 <links>
2612                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2613                 </links>
2614         </class>
2615         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2616                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2617                         <field name="fingerprint"  reporter:datatype="text"/>
2618                         <field name="id" reporter:datatype="id" />
2619                         <field name="master_record" reporter:datatype="link"/>
2620                         <field name="mods"  reporter:datatype="text"/>
2621                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2622                 </fields>
2623                 <links>
2624                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2625                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2626                 </links>
2627         </class>
2628         <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">
2629                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2630                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2631                         <field name="name"  reporter:datatype="text"/>
2632                 </fields>
2633                 <links/>
2634         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2635             <actions>
2636                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2637                 <retrieve/>
2638                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2639                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2640             </actions>
2641         </permacrud>
2642         </class>
2643         <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">
2644                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2645                         <field name="code"  reporter:datatype="text"/>
2646                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2647                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2648                 </fields>
2649                 <links/>
2650         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2651             <actions>
2652                 <create permission="CREATE_PERM" global_required="true"/>
2653                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2654                 <update permission="UPDATE_PERM" global_required="true"/>
2655                 <delete permission="DELETE_PERM" global_required="true"/>
2656             </actions>
2657         </permacrud>
2658         </class>
2659         <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">
2660                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2661                         <field name="id" reporter:datatype="id" />
2662                         <field name="metarecord" reporter:datatype="link"/>
2663                         <field name="source" reporter:datatype="link"/>
2664                 </fields>
2665                 <links>
2666                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2667                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2668                 </links>
2669         </class>
2670         <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">
2671                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2672                         <field name="id" reporter:datatype="id" />
2673                         <field name="field" reporter:datatype="link"/>
2674                         <field name="source" reporter:datatype="link"/>
2675                         <field name="value"  reporter:datatype="text"/>
2676                 </fields>
2677                 <links>
2678                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2679                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2680                 </links>
2681         </class>
2682         <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">
2683                 <oils_persist:source_definition>
2684                         SELECT * FROM metabib.author_field_entry
2685                                                 UNION ALL
2686                         SELECT * FROM metabib.keyword_field_entry
2687                                                 UNION ALL
2688                         SELECT * FROM metabib.identifier_field_entry
2689                                                 UNION ALL
2690                         SELECT * FROM metabib.title_field_entry
2691                                                 UNION ALL
2692                         SELECT * FROM metabib.subject_field_entry
2693                                                 UNION ALL
2694                         SELECT * FROM metabib.series_field_entry
2695                 </oils_persist:source_definition>
2696                 <fields>
2697                         <field name="field" reporter:datatype="link"/>
2698                         <field name="id" reporter:datatype="id" />
2699                         <field name="source" reporter:datatype="link"/>
2700                         <field name="value"  reporter:datatype="text"/>
2701                 </fields>
2702                 <links>
2703                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2704                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2705                 </links>
2706         </class>
2707         <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">
2708                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2709                         <field name="field" reporter:datatype="link"/>
2710                         <field name="id" reporter:datatype="id" />
2711                         <field name="source" reporter:datatype="link"/>
2712                         <field name="value"  reporter:datatype="text"/>
2713                 </fields>
2714                 <links>
2715                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2716                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2717                 </links>
2718         </class>
2719         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2720                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2721                         <field name="accepting_usr" reporter:datatype="link"/>
2722                         <field name="amount" reporter:datatype="money" />
2723                         <field name="amount_collected" reporter:datatype="money" />
2724                         <field name="cash_drawer" reporter:datatype="link"/>
2725                         <field name="id" reporter:datatype="id" />
2726                         <field name="note"  reporter:datatype="text"/>
2727                         <field name="payment_ts" reporter:datatype="timestamp"/>
2728                         <field name="xact" reporter:datatype="link"/>
2729                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2730                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2731                 </fields>
2732                 <links>
2733                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2734                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2735                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2736                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2737                 </links>
2738         </class>
2739         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2740                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2741                         <field name="accepting_usr" reporter:datatype="link"/>
2742                         <field name="amount" reporter:datatype="money" />
2743                         <field name="amount_collected" reporter:datatype="money" />
2744                         <field name="id" reporter:datatype="id" />
2745                         <field name="note"  reporter:datatype="text"/>
2746                         <field name="payment_ts" reporter:datatype="timestamp"/>
2747                         <field name="xact" reporter:datatype="link"/>
2748                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2749                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2750                 </fields>
2751                 <links>
2752                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2753                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2754                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2755                 </links>
2756         </class>
2757         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2758                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2759                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2760                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2761                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2762                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2763                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2764                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2765                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2766                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2767                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2768                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2769                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2770                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2771                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2772                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2773                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2774                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2775                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2776                 </fields>
2777                 <links>
2778                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2779                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2780                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2781                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2782                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2783                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2784                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2785                 </links>
2786         </class>
2787
2788         <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">
2789                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2790                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2791                         <field name="name"  reporter:datatype="text"/>
2792                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2793                         <field name="block_list" reporter:datatype="text"/>
2794                         <field name="org_depth" reporter:datatype="int"/>
2795                 </fields>
2796                 <links/>
2797         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2798             <actions>
2799                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2800                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2801                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2802                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2803             </actions>
2804         </permacrud>
2805         </class>
2806         <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">
2807                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2808                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2809                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2810                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2811                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2812                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2813                 </fields>
2814                 <links>
2815                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2816                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2817                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2818         </links>
2819         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2820             <actions>
2821                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2822                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2823                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2824                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2825             </actions>
2826         </permacrud>
2827         </class>
2828         <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">
2829                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2830                         <field name="holdable" reporter:datatype="bool"/>
2831                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2832                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2833                         <field name="opac_visible" reporter:datatype="bool"/>
2834             <field name="copy_active" reporter:datatype="bool"/>
2835                 </fields>
2836                 <links/>
2837         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2838             <actions>
2839                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2840                 <retrieve/>
2841                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2842                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2843             </actions>
2844         </permacrud>
2845         </class>
2846         <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">
2847                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2848                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2849                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2850                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2851                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2852                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2853                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2854                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2855                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2856                 </fields>
2857                 <links>
2858                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2859                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2860                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2861                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2862                 </links>
2863                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2864                         <actions>
2865                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2866                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2867                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2868                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2869                         </actions>
2870                 </permacrud>
2871         </class>
2872         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2873                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2874                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2875                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2876                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2877                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2878                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2879                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2880                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2881                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2882                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2883                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2884                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2885                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2886                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2887                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2888                 </fields>
2889                 <links>
2890                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2891                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2892                 </links>
2893         </class>
2894
2895         <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">
2896                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
2897                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2898                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
2899                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2900                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2901                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
2902                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
2903                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
2904                 </fields>
2905                 <links>
2906                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2907                 </links>
2908         </class>
2909
2910         <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">
2911                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2912                         <field name="call_number" />
2913                         <field name="create_date" reporter:datatype="timestamp"/>
2914                         <field name="creator" reporter:datatype="link"/>
2915                         <field name="id" reporter:datatype="id" />
2916                         <field name="pub" reporter:datatype="bool"/>
2917                         <field name="title"  reporter:datatype="text"/>
2918                         <field name="value"  reporter:datatype="text"/>
2919                 </fields>
2920                 <links>
2921                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2922                 </links>
2923         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2924             <actions>
2925                 <create permission="CREATE_VOLUME_NOTE">
2926                     <context link="call_number" field="owning_lib"/>
2927                 </create>
2928                 <retrieve permission="VIEW_VOLUME_NOTES">
2929                     <context link="call_number" field="owning_lib"/>
2930                 </retrieve>
2931                 <update permission="UPDATE_VOLUME_NOTE">
2932                     <context link="call_number" field="owning_lib"/>
2933                 </update>
2934                 <delete permission="DELETE_VOLUME_NOTE">
2935                     <context link="call_number" field="owning_lib"/>
2936                 </delete>
2937             </actions>
2938         </permacrud>
2939         </class>
2940         <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">
2941                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2942                         <field name="create_date" reporter:datatype="timestamp"/>
2943                         <field name="creator" reporter:datatype="link"/>
2944                         <field name="edit_date" reporter:datatype="timestamp"/>
2945                         <field name="editor" reporter:datatype="link"/>
2946                         <field name="id" reporter:datatype="id" />
2947                         <field name="record" reporter:datatype="link"/>
2948                         <field name="value" reporter:datatype="text"/>
2949                 </fields>
2950                 <links>
2951                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2952                 </links>
2953         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2954             <actions>
2955                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2956                 <retrieve/>
2957                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2958                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2959             </actions>
2960         </permacrud>
2961         </class>
2962         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
2963         <oils_persist:source_definition>
2964 SELECT  usr,
2965         SUM(
2966             CASE
2967                 WHEN (
2968                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
2969                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2970                 ) THEN 1
2971                 ELSE 0
2972             END
2973         ) AS out,
2974
2975         SUM(
2976             CASE
2977                 WHEN (
2978                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
2979                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2980                 ) THEN 1
2981                 ELSE 0
2982             END
2983         ) AS overdue,
2984
2985         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
2986         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
2987         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
2988   FROM  action.circulation
2989   WHERE checkin_time IS NULL
2990   GROUP BY 1
2991         </oils_persist:source_definition>
2992         <fields oils_persist:primary="usr">
2993             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
2994             <field reporter:label="Out" name="out" reporter:datatype="text"/>
2995             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
2996             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
2997             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
2998             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
2999         </fields>
3000         <links>
3001             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3002         </links>
3003         </class>
3004         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3005         <oils_persist:source_definition>
3006 SELECT  usr,
3007         ARRAY_TO_STRING(ARRAY_ACCUM(
3008             CASE
3009                 WHEN (
3010                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3011                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3012                 ) THEN id
3013                 ELSE 0
3014             END
3015         ),',') AS out,
3016
3017         ARRAY_TO_STRING(ARRAY_ACCUM(
3018             CASE
3019                 WHEN (
3020                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3021                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3022                 ) THEN id
3023                 ELSE 0
3024             END
3025         ),',') AS overdue,
3026
3027         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3028         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3029         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3030   FROM  action.circulation
3031   WHERE checkin_time IS NULL
3032   GROUP BY 1
3033         </oils_persist:source_definition>
3034         <fields oils_persist:primary="usr">
3035             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3036             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3037             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3038             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3039             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3040             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3041         </fields>
3042         <links>
3043             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3044         </links>
3045         </class>
3046         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3047                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3048                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3049                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3050                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3051                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3052                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3053                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3054                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3055                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3056                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3057                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3058                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3059                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3060                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3061                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3062                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3063                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3064                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3065                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3066                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3067                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3068                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3069                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3070                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3071                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3072                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3073                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3074                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3075                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3076                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3077                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3078                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3079                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3080                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3081                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3082                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3083                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3084                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3085                 </fields>
3086                 <links>
3087                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3088                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3089                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3090                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3091                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3092                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3093                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3094                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3095                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3096                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3097                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3098                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3099                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3100                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3101                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3102                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3103                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3104                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3105                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3106                 </links>
3107         </class>
3108         <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">
3109                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3110                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3111                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3112                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3113                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3114                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3115                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3116                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3117                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3118                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3119                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3120                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3121                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3122                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3123                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3124                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3125                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3126                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3127                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3128                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3129                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3130                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3131                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3132                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3133                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3134                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3135                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3136                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3137                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3138                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3139                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3140                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3141                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3142                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3143                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3144                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3145                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3146                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3147                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3148                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3149                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3150                 </fields>
3151                 <links>
3152                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3153                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3154                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3155                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3156                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3157                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3158                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3159                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3160                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3161                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3162                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3163                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3164                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3165                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3166                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3167                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3168                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3169                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3170                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3171                 </links>
3172         </class>
3173         <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">
3174                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3175                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3176                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3177                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3178                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3179                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3180                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3181                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3182                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3183                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3184                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3185                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3186                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3187                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3188                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3189                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3190                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3191                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3192                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3193                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3194                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3195                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3196                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3197                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3198                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3199                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3200                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3201                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3202                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3203                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3204                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3205                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3206                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3207                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3208                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3209                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3210                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3211                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3212                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3213                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3214                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3215                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3216                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3217                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3218                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3219                 </fields>
3220                 <links>
3221                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3222                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3223                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3224                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3225                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3226                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3227                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3228                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3229                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3230                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3231                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3232                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3233                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3234                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3235                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3236                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3237                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3238                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3239                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3240                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3241                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3242                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3243                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3244                 </links>
3245         </class>
3246
3247         <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">
3248                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3249                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3250                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3251                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3252                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3253                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3254                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3255                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3256                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3257                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3258                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3259                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3260                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3261                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3262                 </fields>
3263                 <links>
3264                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3265                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3266                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3267                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3268                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3269                 </links>
3270                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3271                         <actions>
3272                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3273                                 <retrieve />
3274                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3275                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3276                         </actions>
3277                 </permacrud>
3278         </class>
3279
3280         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3281                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3282                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3283                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3284                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3285                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3286                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3287                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3288                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3289                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3290                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3291                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3292                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3293                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3294                 </fields>
3295                 <links>
3296                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3297                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3298                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3299                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3300                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3301                 </links>
3302                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3303                         <actions>
3304                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3305                                 <retrieve />
3306                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3307                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3308                         </actions>
3309                 </permacrud>
3310         </class>
3311         
3312         <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">
3313                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3314                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3315                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3316                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3317                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3318                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3319                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3320                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3321                 </fields>
3322                 <links>
3323                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3324                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3325                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3326                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3327                 </links>
3328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3329                         <actions>
3330                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3331                                 <retrieve />
3332                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3333                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3334                         </actions>
3335                 </permacrud>
3336         </class>
3337         
3338         <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">
3339                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3340                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3341                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3342                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3343                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3344                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3345                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3346                 </fields>
3347                 <links>
3348                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3349                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3350                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3351                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3352                 </links>
3353                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3354                         <actions>
3355                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3356                                 <retrieve />
3357                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3358                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3359                         </actions>
3360                 </permacrud>
3361         </class>
3362         
3363         <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">
3364                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3365                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3366                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3367                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3368                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3369                 </fields>
3370                 <links>
3371                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3372                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3373                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3374                 </links>
3375                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3376                         <actions>
3377                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3378                                 <retrieve />
3379                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3380                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3381                         </actions>
3382                 </permacrud>
3383         </class>
3384         
3385         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3386                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3387                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3388                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3389                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3390                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3391                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3392                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3393                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3394                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3395                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3396                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3397                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3398                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3399                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3400                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3401                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3402                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3403                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3404                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3405                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3406                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3407                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3408                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3409                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3410                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3411                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3412                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3413                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3414                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3415                 </fields>
3416                 <links>
3417                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3418                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3419                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3420                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3421                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3422                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3423                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3424                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3425                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3426                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3427                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3428                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3429                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3430                 </links>
3431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3432                         <actions>
3433                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3434                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3435                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3436                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3437                         </actions>
3438                 </permacrud>
3439         </class>
3440         
3441         <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">
3442                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3443                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3444                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3445                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3446                 </fields>
3447                 <links>
3448                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3449                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3450                 </links>
3451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3452                         <actions>
3453                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3454                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3455                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3456                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3457                         </actions>
3458                 </permacrud>
3459         </class>
3460
3461         <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">
3462                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3463                         <field name="bucket" reporter:datatype="link"/>
3464                         <field name="id" reporter:datatype="id" />
3465                         <field name="target_call_number" reporter:datatype="link" />
3466                         <field name="create_time" reporter:datatype="timestamp" />
3467                         <field name="pos" reporter:datatype="int" />
3468                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3469                 </fields>
3470                 <links>
3471                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3472                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3473             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3474                 </links>
3475         </class>
3476         <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">
3477                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3478                         <field name="id" reporter:datatype="id" />
3479                         <field name="item" reporter:datatype="link"/>
3480                         <field name="note" reporter:datatype="text" />
3481                 </fields>
3482                 <links>
3483                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3484                 </links>
3485         </class>
3486         <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">
3487                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3488                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3489                         <field name="btype" reporter:datatype="text"/>
3490                         <field name="id" reporter:datatype="id" />
3491                         <field name="name" reporter:datatype="text"/>
3492                         <field name="owner" reporter:datatype="link"/>
3493                         <field name="pub" reporter:datatype="bool"/>
3494                         <field name="create_time" reporter:datatype="timestamp" />
3495                 </fields>
3496                 <links>
3497                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3498                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3499                 </links>
3500         </class>
3501         <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">
3502                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3503                         <field name="id" reporter:datatype="id" />
3504                         <field name="bucket" reporter:datatype="link"/>
3505                         <field name="note" reporter:datatype="text" />
3506                 </fields>
3507                 <links>
3508                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3509                 </links>
3510         </class>
3511         <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">
3512                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3513                         <field name="hold" reporter:datatype="link"/>
3514                         <field name="id" reporter:datatype="id" />
3515                         <field name="target_copy" reporter:datatype="link"/>
3516                 </fields>
3517                 <links>
3518                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3519                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3520                 </links>
3521         </class>
3522         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3523                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3524                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3525                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3526                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3527                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3528                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3529                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3530                 </fields>
3531                 <links>
3532                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3533                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3534                 </links>
3535         </class>
3536         <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">
3537                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3538                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3539                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3540                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3541                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3542                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3543                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3544                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3545                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3546                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3547                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3548                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3549                 </fields>
3550                 <links>
3551                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3552                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3553                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3554                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3555                 </links>
3556         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3557             <actions>
3558                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3559                 <retrieve/>
3560                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3561                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3562             </actions>
3563         </permacrud>
3564         </class>
3565
3566     <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">
3567         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3568             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3569             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3570             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3571             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3572         </fields>
3573         <links>
3574             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3575             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3576         </links>
3577         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3578             <actions>
3579                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3580                 <retrieve/>
3581                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3582                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3583             </actions>
3584         </permacrud>
3585     </class>
3586
3587         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
3588                 <fields>
3589                         <field name="sre_id" oils_persist:virtual="true" />
3590                         <field name="location" oils_persist:virtual="true" />
3591                         <field name="owning_lib" oils_persist:virtual="true" />
3592                         <field name="basic_holdings" oils_persist:virtual="true" />
3593                         <field name="basic_holdings_add" oils_persist:virtual="true" />
3594                         <field name="supplement_holdings" oils_persist:virtual="true" />
3595                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
3596                         <field name="index_holdings" oils_persist:virtual="true" />
3597                         <field name="index_holdings_add" oils_persist:virtual="true" />
3598                         <field name="online" oils_persist:virtual="true" />
3599                         <field name="missing" oils_persist:virtual="true" />
3600                         <field name="incomplete" oils_persist:virtual="true" />
3601                 </fields>
3602         </class>
3603
3604         <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">
3605                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3606                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3607                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3608                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3609                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3610                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3611                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3612                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3613                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3614                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3615                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3616                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3617                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3618                 </fields>
3619                 <links>
3620                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3621                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3622                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3623                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3624                 </links>
3625                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3626                         <actions>
3627                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3628                                 <retrieve/>
3629                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3630                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3631                         </actions>
3632                 </permacrud>
3633         </class>
3634
3635         <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">
3636                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3637                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3638                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3639                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3640                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3641                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3642                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3643                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3644                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3645                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3646                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3647                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3648                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3649                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3650                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3651                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3652                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3653                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3654                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3655                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3656                 </fields>
3657                 <links>
3658                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3659                 </links>
3660                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3661                         <actions>
3662                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
3663                                         <context link="subscription" field="owning_lib" />
3664                                 </create>
3665                                 <retrieve />
3666                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
3667                                         <context link="subscription" field="owning_lib" />
3668                                 </update>
3669                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
3670                                         <context link="subscription" field="owning_lib" />
3671                                 </delete>
3672                         </actions>
3673                 </permacrud>
3674         </class>
3675
3676         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3677                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3678                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3679                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
3680                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3681                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3682                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3683                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3684                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3685                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3686                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
3687                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3688                 </fields>
3689                 <links>
3690                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3691                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3692                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
3693                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
3694                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
3695                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
3696                 </links>
3697                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3698                         <actions>
3699                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3700                                 <retrieve />
3701                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3702                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3703                         </actions>
3704                 </permacrud>
3705         </class>
3706
3707         <class id="ssubn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
3708                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
3709                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3710                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3711                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3712                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3713                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3714                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3715                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3716                 </fields>
3717                 <links>
3718                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3719                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3720                 </links>
3721                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3722                 </permacrud>
3723         </class>
3724
3725         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3726                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3727                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3728                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3729                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
3730                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3731                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
3732                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3733                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3734                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3735                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3736                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3737                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
3738                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3739                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3740                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3741                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3742                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3743                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3744                 </fields>
3745                 <links>
3746                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3747                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3748                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3749                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3750                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3751                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3752                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3753                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
3754                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
3755                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
3756                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
3757                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
3758                 </links>
3759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3760                         <actions>
3761                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3762                                 <retrieve />
3763                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3764                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3765                         </actions>
3766                 </permacrud>
3767         </class>
3768
3769         <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">
3770                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
3771                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3772                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3773                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3774                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3775                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3776                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3777                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3778                 </fields>
3779                 <links>
3780                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3781                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3782                 </links>
3783                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3784                         <actions>
3785                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3786                                         <context link="distribution" field="holding_lib" />
3787                                 </create>
3788                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
3789                                         <context link="distribution" field="holding_lib" />
3790                                 </retrieve>
3791                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3792                                         <context link="distribution" field="holding_lib" />
3793                                 </update>
3794                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
3795                                         <context link="distribution" field="holding_lib" />
3796                                 </delete>
3797                         </actions>
3798                 </permacrud>
3799         </class>
3800
3801         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3802                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3803                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3804                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3805                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3806                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3807                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
3808                 </fields>
3809                 <links>
3810                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3811                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3812                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
3813                 </links>
3814                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3815                         <actions>
3816                                 <create permission="ADMIN_SERIAL_STREAM">
3817                                         <context link="distribution" field="holding_lib" />
3818                                 </create>
3819                                 <retrieve />
3820                                 <update permission="ADMIN_SERIAL_STREAM">
3821                                         <context link="distribution" field="holding_lib" />
3822                                 </update>
3823                                 <delete permission="ADMIN_SERIAL_STREAM">
3824                                         <context link="distribution" field="holding_lib" />
3825                                 </delete>
3826                         </actions>
3827                 </permacrud>
3828         </class>
3829
3830         <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">
3831                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
3832                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3833                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3834                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3835                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
3836                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
3837                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3838                 </fields>
3839                 <links>
3840                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3841                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
3842                 </links>
3843                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3844                         <actions>
3845                                 <create permission="ADMIN_SERIAL_STREAM">
3846                                         <context link="stream" jump="distribution" field="holding_lib" />
3847                                 </create>
3848                                 <retrieve permission="RECEIVE_SERIAL">
3849                                         <context link="stream" jump="distribution" field="holding_lib" />
3850                                 </retrieve>
3851                                 <update permission="ADMIN_SERIAL_STREAM">
3852                                         <context link="stream" jump="distribution" field="holding_lib" />
3853                                 </update>
3854                                 <delete permission="ADMIN_SERIAL_STREAM">
3855                                         <context link="stream" jump="distribution" field="holding_lib" />
3856                                 </delete>
3857                         </actions>
3858                 </permacrud>
3859         </class>
3860
3861         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
3862                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
3863                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3864                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3865                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3866                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3867                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3868                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3869                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
3870                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3871                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
3872                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
3873                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
3874                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
3875                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3876                 </fields>
3877                 <links>
3878                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3879                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3880                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3881                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
3882                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
3883                 </links>
3884                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3885                         <actions>
3886                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
3887                                         <context link="subscription" field="owning_lib" />
3888                                 </create>
3889                                 <retrieve/>
3890                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
3891                                         <context link="subscription" field="owning_lib" />
3892                                 </update>
3893                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
3894                                         <context link="subscription" field="owning_lib" />
3895                                 </delete>
3896                         </actions>
3897                 </permacrud>
3898         </class>
3899
3900         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
3901                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3902                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3903                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3904                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3905                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3906                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3907                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3908                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3909                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3910                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3911                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3912                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3913                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
3914                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3915                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3916                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3917                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3918                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3919                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3920                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3921                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3922                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3923                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3924                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3925                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3926                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3927                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3928                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3929                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3930                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3931                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3932                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3933                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3934                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
3935                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
3936                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
3937                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
3938                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3939                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3940                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3941                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3942                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3943                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3944                 </fields>
3945                 <links>
3946                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3947                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3948                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3949                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3950                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3951                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3952                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3953                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3954                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3955                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3956                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3957                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3958                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3959                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3960                 </links>
3961                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3962                         <actions>
3963                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3964                                 <retrieve/>
3965                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3966                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3967                         </actions>
3968                 </permacrud>
3969         </class>
3970
3971         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
3972                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
3973                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3974                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3975                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3976                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3977                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3978                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
3979                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3980                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
3981                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
3982                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
3983                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
3984                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
3985                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3986                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
3987                 </fields>
3988                 <links>
3989                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3990                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3991                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
3992                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3993                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
3994                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3995                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
3996                 </links>
3997                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3998                         <actions>
3999                                 <create permission="ADMIN_SERIAL_ITEM">
4000                                         <context link="stream" jump="distribution" field="holding_lib" />
4001                                 </create>
4002                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4003                                         <context link="stream" jump="distribution" field="holding_lib" />
4004                                 </retrieve>
4005                                 <update permission="ADMIN_SERIAL_ITEM">
4006                                         <context link="stream" jump="distribution" field="holding_lib" />
4007                                 </update>
4008                                 <delete permission="ADMIN_SERIAL_ITEM">
4009                                         <context link="stream" jump="distribution" field="holding_lib" />
4010                                 </delete>
4011                         </actions>
4012                 </permacrud>
4013         </class>
4014
4015         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4016                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4017                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4018                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4019                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4020                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4021                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4022                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4023                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4024                 </fields>
4025                 <links>
4026                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4027                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4028                 </links>
4029                 <!-- Not available via PCRUD at this time -->
4030         </class>
4031
4032         <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">
4033                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4034                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4035                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4036                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4037                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4038                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4039                 </fields>
4040                 <links>
4041                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4042                 </links>
4043                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4044                         <actions>
4045                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4046                                         <context link="distribution" field="holding_lib" />
4047                                 </create>
4048                                 <retrieve/>
4049                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4050                                         <context link="distribution" field="holding_lib" />
4051                                 </update>
4052                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4053                                         <context link="distribution" field="holding_lib" />
4054                                 </create>
4055                         </actions>
4056                 </permacrud>
4057         </class>
4058
4059         <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">
4060                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4061                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4062                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4063                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4064                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4065                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4066                 </fields>
4067                 <links>
4068                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4069                 </links>
4070                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4071                         <actions>
4072                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4073                                         <context link="distribution" field="holding_lib" />
4074                                 </create>
4075                                 <retrieve/>
4076                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4077                                         <context link="distribution" field="holding_lib" />
4078                                 </update>
4079                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4080                                         <context link="distribution" field="holding_lib" />
4081                                 </create>
4082                         </actions>
4083                 </permacrud>
4084         </class>
4085
4086         <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">
4087                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4088                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4089                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4090                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4091                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4092                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4093                 </fields>
4094                 <links>
4095                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4096                 </links>
4097                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4098                         <actions>
4099                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4100                                         <context link="distribution" field="holding_lib" />
4101                                 </create>
4102                                 <retrieve/>
4103                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4104                                         <context link="distribution" field="holding_lib" />
4105                                 </update>
4106                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4107                                         <context link="distribution" field="holding_lib" />
4108                                 </create>
4109                         </actions>
4110                 </permacrud>
4111         </class>
4112
4113         <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">
4114                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4115                         <field name="id" reporter:datatype="id" />
4116                         <field name="owning_copy" reporter:datatype="link"/>
4117                         <field name="stat_cat" reporter:datatype="link"/>
4118                         <field name="stat_cat_entry" reporter:datatype="link"/>
4119                 </fields>
4120                 <links>
4121                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4122                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4123                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4124                 </links>
4125         </class>
4126         <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">
4127                 <fields oils_persist:primary="code">
4128                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4129                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4130                 </fields>
4131                 <links/>
4132         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4133             <actions>
4134                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4135                 <retrieve/>
4136                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4137                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4138             </actions>
4139         </permacrud>
4140         </class>
4141         <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">
4142                 <fields oils_persist:primary="code">
4143                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4144                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4145                 </fields>
4146                 <links/>
4147         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4148             <actions>
4149                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4150                 <retrieve/>
4151                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4152                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4153             </actions>
4154         </permacrud>
4155         </class>
4156         <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">
4157                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4158                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4159                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4160                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4161                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4162                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4163                 </fields>
4164                 <links>
4165             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4166         </links>
4167         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4168             <actions>
4169                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4170                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4171                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4172                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4173             </actions>
4174         </permacrud>
4175         </class>
4176         <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">
4177                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4178                         <field name="id" reporter:datatype="id" />
4179                         <field name="name" reporter:datatype="text"/>
4180                 </fields>
4181                 <links/>
4182         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4183             <actions>
4184                 <create permission="CREATE_LASSO" global_required="true"/>
4185                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4186                 <update permission="UPDATE_LASSO" global_required="true"/>
4187                 <delete permission="DELETE_LASSO" global_required="true"/>
4188             </actions>
4189         </permacrud>
4190         </class>
4191         <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">
4192                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4193                         <field name="id" reporter:datatype="id" />
4194                         <field name="lasso" reporter:datatype="link"/>
4195                         <field name="org_unit" reporter:datatype="org_unit"/>
4196                 </fields>
4197                 <links>
4198                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4199                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4200                 </links>
4201         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4202             <actions>
4203                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4204                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4205                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4206                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4207             </actions>
4208         </permacrud>
4209         </class>
4210         <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">
4211                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4212                         <field name="id" reporter:datatype="id" />
4213                         <field name="from_org" reporter:datatype="org_unit"/>
4214                         <field name="to_org" reporter:datatype="org_unit"/>
4215                         <field name="prox" reporter:datatype="int" />
4216                 </fields>
4217                 <links>
4218                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4219                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4220                 </links>
4221         </class>
4222         <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">
4223                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4224                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4225                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4226                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4227                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4228                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4229                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4230                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4231                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4232                 </fields>
4233                 <links/>
4234         </class>
4235         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4236                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4237                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4238                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4239                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4240                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4241                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4242                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4243                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4244                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4245                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4246                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4247                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4248                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4249                 </fields>
4250                 <links>
4251                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4252                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4253                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4254                 </links>
4255         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4256             <actions>
4257                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4258                 <retrieve/>
4259                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4260                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4261             </actions>
4262         </permacrud>
4263         </class>
4264         <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">
4265                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4266                         <field name="address_type"  reporter:datatype="text"/>
4267                         <field name="city"  reporter:datatype="text"/>
4268                         <field name="country"  reporter:datatype="text"/>
4269                         <field name="county"  reporter:datatype="text"/>
4270                         <field name="id" reporter:datatype="id" />
4271                         <field name="org_unit" reporter:datatype="org_unit"/>
4272                         <field name="post_code"  reporter:datatype="text"/>
4273                         <field name="state"  reporter:datatype="text"/>
4274                         <field name="street1"  reporter:datatype="text"/>
4275                         <field name="street2"  reporter:datatype="text"/>
4276                         <field name="valid" reporter:datatype="bool"/>
4277                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4278                 </fields>
4279                 <links>
4280                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4281                 </links>
4282         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4283             <actions>
4284                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4285                 <retrieve/>
4286                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4287                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4288             </actions>
4289         </permacrud>
4290         </class>
4291         <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">
4292                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4293                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4294                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4295                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4296                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4297                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4298                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4299                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4300                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4301                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4302                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4303                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4304                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4305                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4306                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4307                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4308                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4309                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4310                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4311                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4312                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4313                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4314                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4315                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4316                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4317                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4318                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4319                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4320                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4321                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4322                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4323                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4324                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4325                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4326                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4327                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4328                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4329                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4330                 </fields>
4331                 <links>
4332                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4333                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4334                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4335                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4336                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4337                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4338                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4339                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4340                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4341                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4342                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4343                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4344                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4345                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4346                 </links>
4347         </class>
4348         <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">
4349                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4350                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4351                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4352                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4353                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4354                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4355                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4356                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4357                 </fields>
4358                 <links>
4359                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4360                 </links>
4361                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4362                         <actions>
4363                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4364                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4365                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4366                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4367                         </actions>
4368                 </permacrud>
4369         </class>
4370         <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">
4371                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4372                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4373                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4374                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4375                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4376                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4377                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4378                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4379                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4380                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4381                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4382                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4383                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4384                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4385                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4386                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4387                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4388                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4389                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4390                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4391                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4392                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4393                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4394                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4395                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4396                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4397                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4398                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4399                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4400                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4401                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4402                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4403                 </fields>
4404                 <links>
4405                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4406                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4407                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4408                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4409                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4410                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4411                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4412                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4413                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4414                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4415                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4416                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4417                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4418                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4419                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4420                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4421                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4422                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4423                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4424                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4425                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4426                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4427                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4428                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4429                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4430                 </links>
4431         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4432             <actions>
4433                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4434                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4435                     <context field="id"/>
4436                     <context field="parent_ou"/>
4437                                 </retrieve>
4438                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4439                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4440             </actions>
4441         </permacrud>
4442         </class>
4443         <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">
4444                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4445                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4446                         <field name="btype" reporter:datatype="text"/>
4447                         <field name="id" reporter:datatype="id" />
4448                         <field name="name"  reporter:datatype="text"/>
4449                         <field name="owner" reporter:datatype="link"/>
4450                         <field name="pub" reporter:datatype="bool"/>
4451                         <field name="create_time" reporter:datatype="timestamp" />
4452                 </fields>
4453                 <links>
4454                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4455                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4456                 </links>
4457         </class>
4458         <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">
4459                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4460                         <field name="id" reporter:datatype="id" />
4461                         <field name="bucket" reporter:datatype="link"/>
4462                         <field name="note" reporter:datatype="text" />
4463                 </fields>
4464                 <links>
4465                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4466                 </links>
4467         </class>
4468         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4469                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4470                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4471                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4472                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4473                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4474                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4475                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4476                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4477                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4478                 </fields>
4479                 <links>
4480                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4481                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
4482                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4483                 </links>
4484         </class>
4485         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4486                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4487                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4488                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4489                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4490                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4491                 </fields>
4492                 <links>
4493                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4494                 </links>
4495         </class>
4496     <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">
4497         <fields oils_persist:primary="field">
4498             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
4499             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
4500             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
4501         </fields>
4502         <links/>
4503         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4504             <actions>
4505                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
4506                 <retrieve />
4507                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
4508                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
4509             </actions>
4510         </permacrud>
4511     </class>
4512         <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">
4513                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4514                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4515                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4516                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4517                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4518                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4519                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
4520                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4521                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4522                 </fields>
4523                 <links>
4524                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4525                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
4526                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
4527                 </links>
4528         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4529             <actions>
4530                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
4531                 <retrieve />
4532                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
4533                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
4534             </actions>
4535         </permacrud>
4536         </class>
4537         <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">
4538                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
4539                         <field name="field" reporter:datatype="link"/>
4540                         <field name="id" reporter:datatype="id" />
4541                         <field name="source" reporter:datatype="link"/>
4542                         <field name="value"  reporter:datatype="text"/>
4543                 </fields>
4544                 <links>
4545                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4546                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4547                 </links>
4548         </class>
4549         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
4550                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
4551                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4552                         <field name="btype" reporter:datatype="text"/>
4553                         <field name="id" reporter:datatype="id" />
4554                         <field name="name"  reporter:datatype="text"/>
4555                         <field name="owner" reporter:datatype="link"/>
4556                         <field name="pub" reporter:datatype="bool"/>
4557                         <field name="create_time" reporter:datatype="timestamp" />
4558                 </fields>
4559                 <links>
4560                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4561                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
4562                 </links>
4563         </class>
4564         <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">
4565                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
4566                         <field name="id" reporter:datatype="id" />
4567                         <field name="bucket" reporter:datatype="link"/>
4568                         <field name="note" reporter:datatype="text" />
4569                 </fields>
4570                 <links>
4571                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4572                 </links>
4573         </class>
4574         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
4575                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4576                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4577                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4578                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4579                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
4580                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
4581                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4582                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4583                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4584                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4585                 </fields>
4586                 <links>
4587                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4588                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4589                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4590                 </links>
4591         </class>
4592         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
4593                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
4594                         <field name="id" reporter:datatype="id" />
4595                         <field name="ind1" />
4596                         <field name="ind2" />
4597                         <field name="record" />
4598                         <field name="subfield" />
4599                         <field name="tag" />
4600                         <field name="value" />
4601                 </fields>
4602                 <links>
4603                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4604                 </links>
4605         </class>
4606         <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">
4607                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
4608                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
4609                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4610                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
4611                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4612                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
4613                 </fields>
4614                 <links>
4615                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4616                 </links>
4617         </class>
4618         <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">
4619                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
4620                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4621                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
4622                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
4623                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
4624                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4625                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4626                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
4627                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
4628                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
4629                 </fields>
4630                 <links>
4631                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
4632                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
4633                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
4634                 </links>
4635         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4636             <actions>
4637                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
4638                 <retrieve/>
4639                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
4640                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
4641             </actions>
4642         </permacrud>
4643         </class>
4644         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
4645                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
4646                         <field name="create_date" reporter:datatype="timestamp"/>
4647                         <field name="creator" reporter:datatype="link"/>
4648                         <field name="edit_date" reporter:datatype="timestamp"/>
4649                         <field name="editor" reporter:datatype="link"/>
4650                         <field name="id" reporter:datatype="id" />
4651                         <field name="pub" reporter:datatype="bool"/>
4652                         <field name="record" reporter:datatype="link"/>
4653                         <field name="value"  reporter:datatype="text"/>
4654                 </fields>
4655                 <links>
4656                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4657                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4658                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4659                 </links>
4660         </class>
4661         <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">
4662                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4663                         <field name="balance_owed" reporter:datatype="money" />
4664                         <field name="total_owed" reporter:datatype="money" />
4665                         <field name="total_paid" reporter:datatype="money" />
4666                         <field name="usr" reporter:datatype="link"/>
4667                 </fields>
4668                 <links>
4669                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4670                 </links>
4671         </class>
4672         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
4673                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4674                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
4675                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4676                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
4677                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4678                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
4679                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
4680                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4681                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4682                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4683                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4684                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4685                 </fields>
4686                 <links>
4687                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4688                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4689                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4690                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4691                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4692                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4693                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4694                 </links>
4695         </class>
4696         <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">
4697                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
4698                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
4699                         <field name="quality" reporter:datatype="int" />
4700                         <field name="source" reporter:datatype="text"/>
4701                         <field name="transcendant" reporter:datatype="bool"/>
4702                 </fields>
4703                 <links/>
4704         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4705             <actions>
4706                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
4707                 <retrieve/>
4708                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
4709                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
4710             </actions>
4711         </permacrud>
4712         </class>
4713         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
4714                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4715                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4716                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4717                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4718                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4719                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4720                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
4721                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4722                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4723                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4724                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4725                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4726                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4727                 </fields>
4728                 <links>
4729                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4730                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4731                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4732                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4733                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4734                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4735                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4736                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4737                 </links>
4738         </class>
4739         <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">
4740                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
4741                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4742                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4743                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4744                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
4745                 </fields>
4746                 <links>
4747                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4748                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4749                 </links>
4750         </class>
4751         <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">
4752                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
4753                         <field name="bucket" reporter:datatype="link"/>
4754                         <field name="id" reporter:datatype="id" />
4755                         <field name="target_user" reporter:datatype="link"/>
4756                         <field name="create_time" reporter:datatype="timestamp" />
4757                         <field name="pos" reporter:datatype="int" />
4758                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4759                 </fields>
4760                 <links>
4761                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
4762                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4763             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
4764                 </links>
4765         </class>
4766         <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">
4767                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
4768                         <field name="id" reporter:datatype="id" />
4769                         <field name="item" reporter:datatype="link"/>
4770                         <field name="note" reporter:datatype="text" />
4771                 </fields>
4772                 <links>
4773                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
4774                 </links>
4775         </class>
4776         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
4777                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4778                         <field name="balance_owed" reporter:datatype="money" />
4779                         <field name="total_owed" reporter:datatype="money" />
4780                         <field name="total_paid" reporter:datatype="money" />
4781                         <field name="usr" reporter:datatype="link"/>
4782                 </fields>
4783                 <links>
4784                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4785                 </links>
4786         </class>
4787         <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">
4788                 <fields oils_persist:primary="code" oils_persist:sequence="">
4789                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
4790                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4791                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4792                 </fields>
4793                 <links/>
4794         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4795             <actions>
4796                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4797                 <retrieve/>
4798                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4799                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4800             </actions>
4801         </permacrud>
4802         </class>
4803         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
4804                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4805                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4806                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4807                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4808                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4809                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4810                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4811                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4812                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4813                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4814                 </fields>
4815                 <links>
4816                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4817                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4818                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4819                 </links>
4820         </class>
4821         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
4822                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4823                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4824                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4825                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4826                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4827                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4828                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4829                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4830                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4831                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4832                 </fields>
4833                 <links>
4834                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4835                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4836                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4837                 </links>
4838         </class>
4839         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
4840                 <fields oils_persist:primary="id" oils_persist:sequence="">
4841                         <field name="checkin_lib" reporter:datatype="link"/>
4842                         <field name="checkin_staff" reporter:datatype="link"/>
4843                         <field name="checkin_time" reporter:datatype="timestamp"/>
4844                         <field name="circ_lib"  reporter:datatype="org_unit"/>
4845                         <field name="circ_staff" reporter:datatype="link"/>
4846                         <field name="desk_renewal" reporter:datatype="bool"/>
4847                         <field name="due_date" reporter:datatype="timestamp"/>
4848                         <field name="duration" reporter:datatype="interval"/>
4849                         <field name="duration_rule" reporter:datatype="link"/>
4850                         <field name="fine_interval" reporter:datatype="interval"/>
4851                         <field name="id" reporter:datatype="id" />
4852                         <field name="max_fine" reporter:datatype="money" />
4853                         <field name="max_fine_rule" reporter:datatype="link"/>
4854                         <field name="opac_renewal" reporter:datatype="bool"/>
4855                         <field name="phone_renewal" reporter:datatype="bool"/>
4856                         <field name="recurring_fine" reporter:datatype="money" />
4857                         <field name="recurring_fine_rule" reporter:datatype="link"/>
4858                         <field name="renewal_remaining" reporter:datatype="int" />
4859             <field name="grace_period" reporter:datatype="interval" />
4860                         <field name="stop_fines" reporter:datatype="text"/>
4861                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
4862                         <field name="target_copy" reporter:datatype="link"/>
4863                         <field name="usr" reporter:datatype="link"/>
4864                         <field name="xact_finish" reporter:datatype="timestamp" />
4865                         <field name="xact_start" reporter:datatype="timestamp" />
4866                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4867                 </fields>
4868                 <links>
4869                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4870                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4871                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4872                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4873                 </links>
4874         </class>
4875         <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">
4876                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
4877                         <field name="field" reporter:datatype="link"/>
4878                         <field name="id" reporter:datatype="id" />
4879                         <field name="source" reporter:datatype="link"/>
4880                         <field name="value" reporter:datatype="text"/>
4881                 </fields>
4882                 <links>
4883                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4884                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4885                 </links>
4886         </class>
4887         <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">
4888                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
4889                         <field name="high" reporter:datatype="money" />
4890                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4891                         <field name="low" reporter:datatype="money" />
4892                         <field name="name" reporter:datatype="text"/>
4893                         <field name="normal" reporter:datatype="money" />
4894                         <field name="recurrence_interval" reporter:datatype="interval"/>
4895             <field name="grace_period" reporter:datatype="interval" />
4896                 </fields>
4897                 <links/>
4898         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4899             <actions>
4900                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4901                 <retrieve/>
4902                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4903                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4904             </actions>
4905         </permacrud>
4906         </class>
4907         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
4908                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4909                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4910                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4911                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4912                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
4913                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
4914                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4915                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4916                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4917                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
4918                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4919                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4920                 </fields>
4921                 <links>
4922                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4923                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4924                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4925                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4926                 </links>
4927         </class>
4928         <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">
4929                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4930                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4931                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4932                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4933                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4934                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4935                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4936                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4937                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4938                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4939                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4940                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4941                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4942                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4943                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4944                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4945                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4946                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4947                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4948                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4949                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4950                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4951                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4952                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
4953                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4954                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4955                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4956                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4957                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4958                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4959                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4960                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4961                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4962                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4963                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4964                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4965                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4966                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4967                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4968                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4969                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
4970                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4971                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
4972                 </fields>
4973                 <links>
4974                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4975                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4976                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4977                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4978                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4979                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4980                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4981                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4982                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4983                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4984                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4985                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4986                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4987                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4988                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
4989                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
4990                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
4991                 </links>
4992         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4993             <actions>
4994                 <create permission="CREATE_COPY">
4995                     <context link="call_number" field="owning_lib"/>
4996                 </create>
4997                 <retrieve/>
4998                 <update permission="UPDATE_COPY">
4999                     <context link="call_number" field="owning_lib"/>
5000                 </update>
5001                 <delete permission="DELETE_COPY">
5002                     <context link="call_number" field="owning_lib"/>
5003                 </delete>
5004             </actions>
5005         </permacrud>
5006         </class>
5007
5008         <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">
5009                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5010                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5011                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5012                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5013                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5014                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5015                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5016                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5017                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5018                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
5019                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5020                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5021                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5022                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5023                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5024                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5025                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5026                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5027                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5028                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5029                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5030                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5031                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5032                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5033                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5034                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5035                 </fields>
5036                 <links>
5037                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5038                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5039                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5040                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5041                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5042                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5043                 </links>
5044                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5045                         <actions>
5046                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5047                                 <retrieve />
5048                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5049                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5050                         </actions>
5051                 </permacrud>
5052         </class>
5053
5054         <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">
5055                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5056                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5057                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5058                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5059                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5060                 </fields>
5061                 <links/>
5062         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5063             <actions>
5064                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5065                 <retrieve/>
5066                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5067                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5068             </actions>
5069         </permacrud>
5070         </class>
5071         <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">
5072                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5073                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5074                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5075                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5076                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5077                 </fields>
5078                 <links/>
5079         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5080             <actions>
5081                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5082                 <retrieve/>
5083                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5084                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5085             </actions>
5086         </permacrud>
5087         </class>
5088         <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">
5089                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5090                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5091                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5092                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5093                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5094                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5095                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5096                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5097                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5098                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5099                 </fields>
5100                 <links>
5101                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5102                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5103                 </links>
5104         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5105             <actions>
5106                 <create permission="CREATE_PERM" global_required="true"/>
5107                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5108                 <update permission="UPDATE_PERM" global_required="true"/>
5109                 <delete permission="DELETE_PERM" global_required="true"/>
5110             </actions>
5111         </permacrud>
5112         </class>
5113         <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">
5114                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5115                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5116                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5117                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5118                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5119                 </fields>
5120                 <links>
5121                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5122                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5123                 </links>
5124         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5125             <actions>
5126                 <create permission="ADMIN_SURVEY">
5127                     <context link="question" jump="survey" field="owner"/>
5128                 </create>
5129                 <retrieve/>
5130                 <update permission="ADMIN_SURVEY">
5131                     <context link="question" jump="survey" field="owner"/>
5132                 </update>
5133                 <delete permission="ADMIN_SURVEY">
5134                     <context link="question" jump="survey" field="owner"/>
5135                 </delete>
5136             </actions>
5137         </permacrud>
5138         </class>
5139         <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">
5140                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5141                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5142                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5143                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5144                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5145                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5146                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5147                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5148                 </fields>
5149                 <links>
5150                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5151                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5152                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5153                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5154                 </links>
5155         </class>
5156         <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">
5157                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5158                         <field name="balance_owed" reporter:datatype="money" />
5159                         <field name="total_owed" reporter:datatype="money" />
5160                         <field name="total_paid" reporter:datatype="money" />
5161                         <field name="usr" reporter:datatype="link"/>
5162                 </fields>
5163                 <links>
5164                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5165                 </links>
5166         </class>
5167         <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">
5168                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5169                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5170                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5171                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5172                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5173                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5174                 </fields>
5175                 <links>
5176                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5177                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5178                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5179                 </links>
5180         </class>
5181         <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">
5182                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5183                         <field name="field" reporter:datatype="link"/>
5184                         <field name="id" reporter:datatype="id" />
5185                         <field name="source" reporter:datatype="link"/>
5186                         <field name="value" reporter:datatype="text"/>
5187                 </fields>
5188                 <links>
5189                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5190                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5191                 </links>
5192         </class>
5193         <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">
5194                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5195                         <field name="field" reporter:datatype="link"/>
5196                         <field name="id" reporter:datatype="id" />
5197                         <field name="source" reporter:datatype="link"/>
5198                         <field name="value" reporter:datatype="text"/>
5199                 </fields>
5200                 <links>
5201                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5202                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5203                 </links>
5204         </class>
5205         <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">
5206                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5207                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5208                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5209                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5210                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5211                 </fields>
5212                 <links>
5213                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5214                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5215                 </links>
5216         </class>
5217         <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">
5218                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5219                         <field name="depth" reporter:datatype="int" />
5220                         <field name="grantable" reporter:datatype="bool"/>
5221                         <field name="grp" reporter:datatype="link"/>
5222                         <field name="id" reporter:datatype="id" />
5223                         <field name="perm" reporter:datatype="link"/>
5224                 </fields>
5225                 <links>
5226                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5227                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5228                 </links>
5229         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5230             <actions>
5231                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5232                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5233                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5234                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5235             </actions>
5236         </permacrud>
5237         </class>
5238         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5239                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5240                         <field name="items" oils_persist:virtual="true" />
5241                         <field name="btype" reporter:datatype="text"/>
5242                         <field name="id" reporter:datatype="id" />
5243                         <field name="name" reporter:datatype="text"/>
5244                         <field name="owner" reporter:datatype="link"/>
5245                         <field name="pub" reporter:datatype="bool"/>
5246                         <field name="create_time" reporter:datatype="timestamp" />
5247                 </fields>
5248                 <links>
5249                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5250                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5251                 </links>
5252         </class>
5253         <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">
5254                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5255                         <field name="id" reporter:datatype="id" />
5256                         <field name="bucket" reporter:datatype="link"/>
5257                         <field name="note" reporter:datatype="text" />
5258                 </fields>
5259                 <links>
5260                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5261                 </links>
5262         </class>
5263         <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">
5264                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5265                         <field name="id" reporter:datatype="int" />
5266                         <field name="usr" reporter:datatype="link"/>
5267                         <field name="work_ou" reporter:datatype="link"/>
5268                 </fields>
5269                 <links>
5270                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5271                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5272                 </links>
5273         </class>
5274         <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">
5275                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5276                         <field name="depth" reporter:datatype="int"/>
5277                         <field name="grantable" reporter:datatype="bool"/>
5278                         <field name="id" reporter:datatype="id" />
5279                         <field name="perm" reporter:datatype="link"/>
5280                         <field name="usr" reporter:datatype="link"/>
5281                 </fields>
5282                 <links>
5283                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5284                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5285                 </links>
5286         </class>
5287         <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">
5288                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5289                         <field name="object_id" reporter:datatype="text"/>
5290                         <field name="grantable" reporter:datatype="bool"/>
5291                         <field name="id" reporter:datatype="id" />
5292                         <field name="perm" reporter:datatype="link"/>
5293                         <field name="usr" reporter:datatype="link"/>
5294                         <field name="object_type" reporter:datatype="text"/>
5295                 </fields>
5296                 <links>
5297                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5298                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5299                 </links>
5300         </class>
5301         <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">
5302                 <fields oils_persist:primary="id" oils_persist:sequence="">
5303                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5304                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5305                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5306                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5307                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5308                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5309                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5310                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5311                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5312                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5313                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5314                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5315                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5316                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5317                 </fields>
5318                 <links>
5319                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5320                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5321                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5322                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5323                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5324                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5325                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5326                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5327                 </links>
5328         </class>
5329         <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">
5330                 <fields oils_persist:primary="id" oils_persist:sequence="">
5331                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5332                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5333                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5334                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5335                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5336                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5337                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5338                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5339                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5340                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5341                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5342                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5343                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5344                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5345                 </fields>
5346                 <links>
5347                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5348                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5349                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5350                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5351                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5352                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5353                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5354                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5355                 </links>
5356         </class>
5357         <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">
5358                 <fields oils_persist:primary="id" oils_persist:sequence="">
5359                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5360                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5361                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5362                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5363                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5364                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5365                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5366                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5367                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5368                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5369                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5370                 </fields>
5371                 <links>
5372                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5373                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5374                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5375                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5376                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5377                 </links>
5378         </class>
5379         <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">
5380                 <fields oils_persist:primary="id" oils_persist:sequence="">
5381                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5382                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5383                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5384                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5385                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5386                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5387                         <field reporter:label="Accepting User" name="accepting_usr" />
5388                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5389                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5390                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5391                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5392                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5393                 </fields>
5394                 <links>
5395                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5396                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5397                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5398                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5399                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5400                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5401                 </links>
5402         </class>
5403         <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">
5404                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5405                         <field name="bucket" reporter:datatype="link"/>
5406                         <field name="id" reporter:datatype="id" />
5407                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5408                         <field name="create_time" reporter:datatype="timestamp" />
5409                         <field name="pos" reporter:datatype="int" />
5410                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5411                 </fields>
5412                 <links>
5413                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5414                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5415             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5416                 </links>
5417         </class>
5418         <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">
5419                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5420                         <field name="id" reporter:datatype="id" />
5421                         <field name="item" reporter:datatype="link"/>
5422                         <field name="note" reporter:datatype="text" />
5423                 </fields>
5424                 <links>
5425                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5426                 </links>
5427         </class>
5428         <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">
5429                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5430                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5431                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5432                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5433                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5434                 </fields>
5435                 <links>
5436                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5437                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5438                 </links>
5439         </class>
5440     <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">
5441         <fields oils_persist:primary="field">
5442             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5443             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5444             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5445         </fields>
5446         <links/>
5447         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5448             <actions>
5449                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
5450                 <retrieve />
5451                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
5452                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
5453             </actions>
5454         </permacrud>
5455     </class>
5456         <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">
5457                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5458                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5459                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5460                 </fields>
5461                 <links/>
5462         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5463             <actions>
5464                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5465                 <retrieve/>
5466                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5467                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5468             </actions>
5469         </permacrud>
5470         </class>
5471
5472
5473         <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">
5474                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5475                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5476                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5477                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5478                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5479                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5480                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5481                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5482                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5483                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5484                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5485                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5486                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5487                 </fields>
5488                 <links>
5489                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5490                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5491                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5492                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5493                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5494                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5495                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5496                 </links>
5497         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5498             <actions>
5499                 <create permission="TRANSIT_COPY">
5500                     <context link="target_copy" field="owner"/>
5501                 </create>
5502                 <retrieve/>
5503                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5504                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5505             </actions>
5506         </permacrud>
5507         </class>
5508         <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">
5509                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5510                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5511                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5512                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5513                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
5514                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5515                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5516                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5517                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5518                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5519                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5520                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5521                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5522                 </fields>
5523                 <links>
5524                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5525                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5526                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5527                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5528                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5529                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5530                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5531                 </links>
5532         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5533             <actions>
5534                 <create permission="TRANSIT_COPY" context_field="owner">
5535                     <context link="target_copy" field="circ_lib"/>
5536                 </create>
5537                 <retrieve/>
5538                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5539                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5540             </actions>
5541         </permacrud>
5542         </class>
5543         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
5544                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
5545                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5546                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
5547                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
5548                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
5549                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5550                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
5551                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5552                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
5553                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5554                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
5555                 </fields>
5556                 <links>
5557                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5558                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
5559                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
5560                 </links>
5561         </class>
5562         <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">
5563                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
5564                         <field name="grp" />
5565                         <field name="id" reporter:datatype="id" />
5566                         <field name="usr" />
5567                 </fields>
5568                 <links>
5569                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5570                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5571                 </links>
5572         </class>
5573         <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">
5574                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
5575                         <field name="id" reporter:datatype="id" />
5576                         <field name="fq_field" reporter:datatype="text"/>
5577                         <field name="identity_value" reporter:datatype="text"/>
5578                         <field name="translation" reporter:datatype="text"/>
5579                         <field name="string" reporter:datatype="text"/>
5580                 </fields>
5581                 <links>
5582                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
5583                 </links>
5584         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5585             <actions>
5586                 <create permission="CREATE_TRANSLATION" global_required="true"/>
5587                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
5588                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
5589                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
5590             </actions>
5591         </permacrud>
5592         </class>
5593         <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">
5594                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
5595                         <field name="id" reporter:datatype="id" />
5596                         <field name="fm_class" reporter:datatype="text"/>
5597                         <field name="field" reporter:datatype="text"/>
5598                         <field name="owner" reporter:datatype="org_unit"/>
5599                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
5600                 </fields>
5601                 <links>
5602                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5603                 </links>
5604         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5605             <actions>
5606                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5607                 <retrieve/>
5608                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5609                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5610             </actions>
5611         </permacrud>
5612         </class>
5613         <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">
5614                 <fields oils_persist:primary="code">
5615                         <field name="code" reporter:datatype="id" />
5616                         <field name="marc_code" reporter:datatype="text"/>
5617                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5618                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5619                 </fields>
5620                 <links/>
5621         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5622             <actions>
5623                 <create permission="CREATE_LOCALE" global_required="true"/>
5624                 <retrieve/>
5625                 <update permission="UPDATE_LOCALE" global_required="true"/>
5626                 <delete permission="DELETE_LOCALE" global_required="true"/>
5627             </actions>
5628         </permacrud>
5629         </class>
5630         <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">
5631                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
5632                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
5633                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
5634                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
5635             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
5636                 </fields>
5637                 <links>
5638                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5639                 </links>
5640         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5641             <actions>
5642                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
5643                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
5644                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
5645                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
5646             </actions>
5647         </permacrud>
5648         </class>
5649
5650         <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">
5651                 <fields oils_persist:primary="id">
5652                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5653                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5654                 </fields>
5655                 <links/>
5656         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5657             <actions>
5658                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5659                 <retrieve/>
5660                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5661                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5662             </actions>
5663         </permacrud>
5664         </class>
5665
5666         <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">
5667                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
5668                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5669                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5670                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
5671                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
5672                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
5673                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
5674                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
5675                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
5676                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5677                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
5678                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
5679                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
5680                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
5681                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
5682                         <field reporter:label="Title" name="title" reporter:datatype="text" />
5683                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
5684                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5685                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
5686                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
5687                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
5688                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
5689                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
5690                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
5691                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
5692                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5693                 </fields>
5694                 <links>
5695                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5696                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5697                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5698                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
5699                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
5700                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5701                 </links>
5702         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5703             <actions>
5704                 <create permission="user_request.create">
5705                     <context link="usr" field="home_ou"/>
5706                                 </create>
5707                 <retrieve permission="user_request.view">
5708                     <context link="usr" field="home_ou"/>
5709                                 </retrieve>
5710                 <update permission="user_request.update">
5711                     <context link="usr" field="home_ou"/>
5712                                 </update>
5713                 <delete permission="user_request.delete">
5714                     <context link="usr" field="home_ou"/>
5715                                 </delete>
5716             </actions>
5717         </permacrud>
5718         </class>
5719
5720         <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">
5721                 <fields oils_persist:primary="code">
5722                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
5723                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5724                 </fields>
5725                 <links/>
5726         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5727             <actions>
5728                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5729                 <retrieve/>
5730                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5731                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5732             </actions>
5733         </permacrud>
5734         </class>
5735
5736         <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">
5737                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
5738                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
5739                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
5740                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
5741                         <field reporter:label="Ratio" name="ratio" />
5742                 </fields>
5743                 <links>
5744                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
5745                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
5746                 </links>
5747                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5748                         <actions>
5749                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5750                                 <retrieve/>
5751                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5752                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5753                         </actions>
5754                 </permacrud>
5755         </class>
5756
5757         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
5758                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
5759                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5760                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5761                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5762                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5763                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5764                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
5765                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
5766                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
5767                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
5768                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5769                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5770                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5771                         <field reporter:label="Email" name="email" reporter:datatype="text" />
5772                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
5773                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
5774                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
5775                 </fields>
5776                 <links>
5777                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5778                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5779             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
5780             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
5781             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
5782                 </links>
5783         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5784             <actions>
5785                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
5786                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
5787                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
5788                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
5789             </actions>
5790         </permacrud>
5791         </class>
5792
5793         <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">
5794                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
5795                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5796                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5797                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5798                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5799                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5800                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5801                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5802                 </fields>
5803                 <links>
5804                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5805                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5806                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5807                 </links>
5808         </class>
5809
5810         <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">
5811                 <fields oils_persist:primary="code">
5812                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
5813                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5814                 </fields>
5815                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5816             <actions>
5817                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5818                 <retrieve/>
5819                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5820                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5821             </actions>
5822                 </permacrud>
5823         </class>
5824
5825         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
5826                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
5827                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
5828                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
5829                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5830                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
5831                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
5832                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
5833                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
5834                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
5835                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
5836                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
5837                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5838                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
5839                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
5840                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
5841                 </fields>
5842                 <links>
5843                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
5844                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5845                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
5846                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
5847                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
5848                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
5849                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
5850                 </links>
5851         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5852             <actions>
5853                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
5854                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
5855                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
5856                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
5857             </actions>
5858         </permacrud>
5859         </class>
5860
5861         <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">
5862                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
5863                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5864                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5865                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5866                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
5867                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
5868                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
5869                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5870                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
5871                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5872                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5873                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5874                 </fields>
5875                 <links>
5876                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5877                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5878                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5879                 </links>
5880         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5881             <actions>
5882                 <create   permission="ADMIN_INVOICE">
5883                                         <context link="invoice" field="receiver"/>
5884                                 </create>
5885                 <retrieve permission="ADMIN_INVOICE">
5886                                         <context link="invoice" field="receiver"/>
5887                                 </retrieve>
5888                 <update   permission="ADMIN_INVOICE">
5889                                         <context link="invoice" field="receiver"/>
5890                                 </update>
5891                                 <delete   permission="ADMIN_INVOICE">
5892                                         <context link="invoice" field="receiver"/>
5893                                 </delete>
5894             </actions>
5895         </permacrud>
5896         </class>
5897
5898         <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">
5899                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
5900                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5901                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5902                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5903                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5904                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
5905                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
5906                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5907                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5908                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5909                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5910                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5911                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5912                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
5913                         <field reporter:label="Target" name="target" reporter:datatype="int" />
5914                 </fields>
5915                 <links>
5916                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5917                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5918                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5919                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
5920                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5921                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
5922                 </links>
5923         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5924             <actions>
5925                 <create   permission="ADMIN_INVOICE">
5926                                         <context link="invoice" field="receiver"/>
5927                                 </create>
5928                 <retrieve permission="ADMIN_INVOICE">
5929                                         <context link="invoice" field="receiver"/>
5930                                 </retrieve>
5931                 <update   permission="ADMIN_INVOICE">
5932                                         <context link="invoice" field="receiver"/>
5933                                 </update>
5934                                 <delete   permission="ADMIN_INVOICE">
5935                                         <context link="invoice" field="receiver"/>
5936                                 </delete>
5937             </actions>
5938         </permacrud>
5939         </class>
5940
5941         <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">
5942                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
5943                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
5944                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5945                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5946                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5947                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5948                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5949                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
5950                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5951                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
5952                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
5953                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
5954                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5955                 </fields>
5956                 <links>
5957                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5958                 </links>
5959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5960             <actions>
5961                 <create permission="ADMIN_PROVIDER">
5962                     <context link="provider" field="owner"/>
5963                 </create>
5964                 <retrieve permission="ADMIN_PROVIDER">
5965                     <context link="provider" field="owner"/>
5966                 </retrieve>
5967                 <update permission="ADMIN_PROVIDER">
5968                     <context link="provider" field="owner"/>
5969                 </update>
5970                 <delete permission="ADMIN_PROVIDER">
5971                     <context link="provider" field="owner"/>
5972                 </delete>
5973             </actions>
5974         </permacrud>
5975         </class>
5976
5977         <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">
5978                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
5979                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5980                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5981                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5982                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
5983                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
5984                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
5985         </fields>
5986                 <links>
5987                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5988                 </links>
5989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5990             <actions>
5991                 <create permission="ADMIN_PROVIDER">
5992                     <context link="provider" field="owner"/>
5993                 </create>
5994                 <retrieve permission="ADMIN_PROVIDER">
5995                     <context link="provider" field="owner"/>
5996                 </retrieve>
5997                 <update permission="ADMIN_PROVIDER">
5998                     <context link="provider" field="owner"/>
5999                 </update>
6000                 <delete permission="ADMIN_PROVIDER">
6001                     <context link="provider" field="owner"/>
6002                 </delete>
6003             </actions>
6004         </permacrud>
6005     </class>
6006         <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">
6007                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6008                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6009                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6010                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6011                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6012                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6013                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6014                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6015                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6016                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6017                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6018                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6019                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6020                 </fields>
6021                 <links>
6022                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6023                 </links>
6024         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6025             <actions>
6026                 <create permission="ADMIN_PROVIDER">
6027                     <context link="contact" jump='provider' field="owner"/>
6028                 </create>
6029                 <retrieve permission="ADMIN_PROVIDER">
6030                     <context link="contact" jump='provider' field="owner"/>
6031                 </retrieve>
6032                 <update permission="ADMIN_PROVIDER">
6033                     <context link="contact" jump='provider' field="owner"/>
6034                 </update>
6035                 <delete permission="ADMIN_PROVIDER">
6036                     <context link="contact" jump='provider' field="owner"/>
6037                 </delete>
6038             </actions>
6039         </permacrud>
6040         </class>
6041
6042         <class id="acqftr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
6043                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6044                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6045                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6046                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6047                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6048                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6049                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6050                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6051                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6052                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6053                 </fields>
6054                 <links>
6055                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6056                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6057                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6058                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6059                 </links>
6060                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6061                 </permacrud>
6062         </class>
6063
6064         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6065                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6066                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6067                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6068                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6069                 </fields>
6070                 <links>
6071             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6072                 </links>
6073                 <!--
6074                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6075                         But here's what it should look like if we ever do use pcrud.
6076                 -->
6077                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6078                         <actions>
6079                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6080                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6081                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6082                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6083                         </actions>
6084                 </permacrud>
6085         </class>
6086
6087         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6088                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6089                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6090                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6091                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6092                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6093                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6094                 </fields>
6095                 <links>
6096                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6097                 </links>
6098                 <!--
6099                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6100                         But here's what it should look like if we ever do use pcrud.
6101                 -->
6102                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6103                         <actions>
6104                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6105                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6106                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6107                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6108                         </actions>
6109                 </permacrud>
6110         </class>
6111
6112         <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">
6113                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6114                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6115                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6116                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6117                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6118                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6119                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6120                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6121                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6122                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6123                 </fields>
6124                 <links>
6125                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6126                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6127             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6128             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6129                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6130                 </links>
6131         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6132             <actions>
6133                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6134                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6135                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6136                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6137             </actions>
6138         </permacrud>
6139         </class>
6140
6141         <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">
6142                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6143                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6144                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6145                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6146                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6147                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6148                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6149                 </fields>
6150                 <links>
6151                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6152                 </links>
6153                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6154                         <actions>
6155                                 <create permission="ADMIN_FUNDING_SOURCE">
6156                     <context link="funding_source" field="owner"/>
6157                 </create>
6158                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6159                     <context link="funding_source" field="owner"/>
6160                 </retrieve>
6161                                 <update permission="ADMIN_FUNDING_SOURCE">
6162                     <context link="funding_source" field="owner"/>
6163                 </update>
6164                                 <delete permission="ADMIN_FUNDING_SOURCE">
6165                     <context link="funding_source" field="owner"/>
6166                 </delete>
6167                         </actions>
6168                 </permacrud>
6169         </class>
6170
6171         <class id="acqofscred" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::ordered_funding_source_credit" oils_persist:tablename="acq.ordered_funding_source_credit" reporter:label="Ordered Funding Source Credit">
6172                 <fields oils_persist:primary="id">
6173                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6174                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6175                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6176                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6177                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6178                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6179                 </fields>
6180                 <links>
6181                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6182                 </links>
6183                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6184                 </permacrud>
6185         </class>
6186
6187         <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">
6188                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6189                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6190                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6191                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6192                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6193                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6194                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6195                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6196                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6197                 </fields>
6198                 <links>
6199                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6200                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6201                 </links>
6202                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6203                         <actions>
6204                                 <create permission="ADMIN_ACQ_FUND">
6205                     <context link="fund" field="org"/>
6206                 </create>
6207                                 <retrieve permission="ADMIN_ACQ_FUND">
6208                     <context link="fund" field="org"/>
6209                 </retrieve>
6210                                 <update permission="ADMIN_ACQ_FUND">
6211                     <context link="fund" field="org"/>
6212                 </update>
6213                                 <delete permission="ADMIN_ACQ_FUND">
6214                     <context link="fund" field="org"/>
6215                 </delete>
6216                         </actions>
6217                 </permacrud>
6218         </class>
6219
6220         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6221                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6222                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6223                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6224                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6225                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6226                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6227                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6228                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6229                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6230                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6231                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6232                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6233                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6234                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6235                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6236                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6237                 </fields>
6238                 <links>
6239                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6240                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6241             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6242             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6243             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6244                 </links>
6245         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6246             <actions>
6247                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6248                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6249                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6250                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6251             </actions>
6252         </permacrud>
6253         </class>
6254
6255         <class id="acqfat" controller="open-ils.cstore 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">
6256                 <fields oils_persist:primary="fund">
6257                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6258                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6259                 </fields>
6260                 <links>
6261                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6262                 </links>
6263         </class>
6264
6265         <class id="acqfdt" controller="open-ils.cstore 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">
6266                 <fields oils_persist:primary="fund">
6267                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6268                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6269                 </fields>
6270                 <links>
6271                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6272                 </links>
6273         </class>
6274
6275         <class id="acqfet" controller="open-ils.cstore 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">
6276                 <fields oils_persist:primary="fund">
6277                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6278                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6279                 </fields>
6280                 <links>
6281                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6282                 </links>
6283         </class>
6284
6285         <class id="acqfst" controller="open-ils.cstore 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">
6286                 <fields oils_persist:primary="fund">
6287                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6288                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6289                 </fields>
6290                 <links>
6291                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6292                 </links>
6293         </class>
6294
6295         <class id="acqfcb" controller="open-ils.cstore 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">
6296                 <fields oils_persist:primary="fund">
6297                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6298                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6299                 </fields>
6300                 <links>
6301                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6302                 </links>
6303         </class>
6304
6305    <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">
6306         <fields oils_persist:primary="fund">
6307             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6308             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6309         </fields>
6310         <links>
6311             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6312         </links>
6313     </class>
6314
6315    <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">
6316         <fields oils_persist:primary="fund">
6317             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6318             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6319         </fields>
6320         <links>
6321             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6322         </links>
6323     </class>
6324
6325    <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">
6326         <fields oils_persist:primary="fund">
6327             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6328             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6329         </fields>
6330         <links>
6331             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6332         </links>
6333     </class>
6334
6335    <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">
6336         <fields oils_persist:primary="fund">
6337             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6338             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6339         </fields>
6340         <links>
6341             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6342         </links>
6343     </class>
6344
6345    <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">
6346         <fields oils_persist:primary="fund">
6347             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6348             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6349         </fields>
6350         <links>
6351             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6352         </links>
6353     </class>
6354
6355         <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">
6356                 <fields oils_persist:primary="funding_source">
6357                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6358                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6359                 </fields>
6360                 <links>
6361                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6362                 </links>
6363         </class>
6364
6365         <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">
6366                 <fields oils_persist:primary="funding_source">
6367                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6368                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6369                 </fields>
6370                 <links>
6371                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6372                 </links>
6373         </class>
6374
6375         <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">
6376                 <fields oils_persist:primary="funding_source">
6377                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6378                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6379                 </fields>
6380                 <links>
6381                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6382                 </links>
6383         </class>
6384
6385         <class id="acqfsb" controller="open-ils.cstore 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">
6386                 <fields oils_persist:primary="fund">
6387                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6388                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6389                 </fields>
6390                 <links>
6391                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6392                 </links>
6393         </class>
6394
6395         <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">
6396                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6397                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6398                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6399                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6400                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6401                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6402                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6403                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6404                 </fields>
6405                 <links>
6406                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6407                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6408                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6409                 </links>
6410                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6411                         <actions>
6412                                 <create permission="ADMIN_ACQ_FUND">
6413                     <context link="fund" field="org"/>
6414                 </create>
6415                                 <retrieve permission="ADMIN_ACQ_FUND">
6416                     <context link="fund" field="org"/>
6417                 </retrieve>
6418                                 <update permission="ADMIN_ACQ_FUND">
6419                     <context link="fund" field="org"/>
6420                 </update>
6421                                 <delete permission="ADMIN_ACQ_FUND">
6422                     <context link="fund" field="org"/>
6423                 </delete>
6424                         </actions>
6425                 </permacrud>
6426         </class>
6427
6428     <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">
6429         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6430             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6431             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6432             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6433             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6434             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6435             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6436             <field reporter:label="Note" name="note" reporter:datatype="text" />
6437             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6438         </fields>
6439         <links>
6440             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6441             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6442             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6443         </links>
6444                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6445                         <actions>
6446                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6447                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6448                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6449                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6450                         </actions>
6451                 </permacrud>
6452     </class>
6453
6454         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6455                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6456                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6457                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6458                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6459                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6460                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6461                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6462                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6463                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6464                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6465                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6466                 </fields>
6467                 <links>
6468                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6469                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6470                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6471                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6472                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6473                 </links>
6474                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6475                         <actions>
6476                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6477                         </actions>
6478                 </permacrud>
6479         </class>
6480
6481         <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">
6482                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6483                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6484                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6485                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6486                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6487                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6488                 </fields>
6489                 <links>
6490                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6491                 </links>
6492                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6493                         <actions>
6494                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6495                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6496                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6497                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6498                         </actions>
6499                 </permacrud>
6500         </class>
6501
6502         <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">
6503                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6504                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6505                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6506                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6507                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6508                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6509                         <field reporter:label="State" name="state" reporter:datatype="text" />
6510                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6511                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6512                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6513                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
6514                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6515                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6516                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6517                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
6518                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6519                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
6520                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
6521                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
6522                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
6523                 </fields>
6524                 <links>
6525                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6526                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6527                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6528                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
6529                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6530                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
6531                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
6532                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
6533                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6534                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6535                 </links>
6536                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6537                         <actions>
6538                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6539                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6540                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6541                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6542                         </actions>
6543                 </permacrud>
6544         </class>
6545
6546         <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">
6547                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
6548                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6549                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6550                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6551                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
6552                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6553                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6554                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6555                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
6556                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6557                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6558                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6559                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6560                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
6561                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6562                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6563                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6564                 </fields>
6565                 <links>
6566                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
6567                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6568                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6569                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6570                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6571                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6572                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6573                 </links>
6574                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6575             <actions>
6576                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6577             </actions>
6578                 </permacrud>
6579         </class>
6580
6581         <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">
6582                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
6583                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6584                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6585                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6586                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6587                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6588                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6589                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
6590                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6591                 </fields>
6592                 <links>
6593                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6594                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6595                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6596                 </links>
6597                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6598             <actions>
6599                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6600                     <context link="purchase_order" field="ordering_agency"/>
6601                 </retrieve>
6602                 <create permission="CREATE_PURCHASE_ORDER">
6603                     <context link="purchase_order" field="ordering_agency"/>
6604                 </create>
6605                 <update permission="CREATE_PURCHASE_ORDER">
6606                     <context link="purchase_order" field="ordering_agency"/>
6607                 </update>
6608                 <delete permission="CREATE_PURCHASE_ORDER">
6609                     <context link="purchase_order" field="ordering_agency"/>
6610                 </delete>
6611             </actions>
6612                 </permacrud>
6613         </class>
6614
6615         <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">
6616                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
6617                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6618                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6619                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6620                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
6621                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6622                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
6623                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6624                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
6625                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
6626                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6627                 </fields>
6628                 <links>
6629                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6630                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6631                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6632                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6633                 </links>
6634                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6635             <actions>
6636                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6637                     <context link="purchase_order" field="ordering_agency"/>
6638                 </retrieve>
6639                 <create permission="CREATE_PURCHASE_ORDER">
6640                     <context link="purchase_order" field="ordering_agency"/>
6641                 </create>
6642                 <update permission="CREATE_PURCHASE_ORDER">
6643                     <context link="purchase_order" field="ordering_agency"/>
6644                 </update>
6645                 <delete permission="CREATE_PURCHASE_ORDER">
6646                     <context link="purchase_order" field="ordering_agency"/>
6647                 </delete>
6648             </actions>
6649                 </permacrud>
6650         </class>
6651
6652         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
6653                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
6654                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
6655                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
6656                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
6657                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6658                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6659                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6660                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6661                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
6662                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
6663                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
6664                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
6665                         <field reporter:label="State" name="state" reporter:datatype="text" />
6666                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6667                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6668                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
6669                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6670                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6671                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
6672                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
6673                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
6674                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
6675                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
6676                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
6677                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
6678                 </fields>
6679                 <links>
6680                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6681                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6682                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6683                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6684                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6685                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6686                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6687                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
6688                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
6689                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
6690                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6691                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
6692                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6693                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
6694                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
6695                 </links>
6696                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6697                         <actions>
6698                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
6699                                         <context link="purchase_order" field="ordering_agency"/>
6700                                         <context link="picklist" field="org_unit"/>
6701                                 </retrieve>
6702                         </actions>
6703                 </permacrud>
6704         </class>
6705
6706         <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">
6707                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
6708                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6709                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6710                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6711                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
6712                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6713                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6714                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
6715                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6716                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6717                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
6718                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
6719                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6720                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6721                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
6722                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
6723                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
6724                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6725                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
6726                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6727                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6728                 </fields>
6729                 <links>
6730                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
6731                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6732                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6733                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6734                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6735                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6736                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6737                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6738                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6739                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6740                 </links>
6741                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6742                         <actions>
6743                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6744                                         <context link="purchase_order" field="ordering_agency"/>
6745                                         <context link="picklist" field="org_unit"/>
6746                                 </retrieve>
6747                         </actions>
6748                 </permacrud>
6749         </class>
6750
6751         <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">
6752                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
6753                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
6754                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6755                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6756                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
6757                 </fields>
6758                 <links>
6759                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6760                 </links>
6761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6762                         <actions>
6763                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6764                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
6765                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6766                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6767                         </actions>
6768                 </permacrud>
6769         </class>
6770
6771         <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">
6772                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
6773                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
6774                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
6775                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6776                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6777                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6778                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6779                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6780                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
6781                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6782                 </fields>
6783                 <links>
6784                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6785                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6786                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6787                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
6788                 </links>
6789         </class>
6790
6791         <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">
6792                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
6793                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
6794                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
6795                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
6796                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
6797                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
6798                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
6799                 </fields>
6800                 <links>
6801                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6802                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
6803                 </links>
6804         </class>
6805
6806         <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">
6807                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
6808                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
6809                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6810                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
6811                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
6812                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
6813                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
6814                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6815                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
6816                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
6817                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
6818                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
6819                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6820                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
6821                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6822                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
6823                 </fields>
6824                 <links>
6825                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6826                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
6827                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6828                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6829                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6830                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6831                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6832                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6833                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
6834                 </links>
6835         </class>
6836
6837         <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">
6838                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6839                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6840                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6841                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6842                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6843                 </fields>
6844                 <links/>
6845                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6846                         <actions>
6847                                 <retrieve />
6848                         </actions>
6849                 </permacrud>
6850         </class>
6851
6852         <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">
6853                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6854                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6855                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6856                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6857                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6858                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6859             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6860                 </fields>
6861                 <links/>
6862         <permacrud>
6863             <actions>
6864                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6865                 <retrieve />
6866                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6867                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6868             </actions>
6869         </permacrud>
6870         </class>
6871
6872         <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">
6873                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6874                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6875                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6876                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6877                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6878                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6879                 </fields>
6880                 <links/>
6881         </class>
6882         <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">
6883                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6884                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6885                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6886                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6887                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6888                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6889                 </fields>
6890                 <links>
6891                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6892                 </links>
6893         </class>
6894
6895         <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">
6896             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6897                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6898                 <field reporter:label="Code" name="code" reporter:datatype="text" />
6899                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6900                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6901                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6902                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6903         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6904
6905             </fields>
6906             <links>
6907                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6908             </links>
6909             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6910                 <actions>
6911                     <create permission="ADMIN_PROVIDER">
6912                         <context link="provider" field="owner"/>
6913                     </create>
6914                     <retrieve permission="ADMIN_PROVIDER">
6915                         <context link="provider" field="owner"/>
6916                     </retrieve>
6917                     <update permission="ADMIN_PROVIDER">
6918                         <context link="provider" field="owner"/>
6919                     </update>
6920                     <delete permission="ADMIN_PROVIDER">
6921                         <context link="provider" field="owner"/>
6922                     </delete>
6923                 </actions>
6924             </permacrud>
6925         </class>
6926         
6927         <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">
6928             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
6929                 <field reporter:label="ID" name="id" reporter:datatype="id" />
6930                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6931                 <field reporter:label="Name" name="name" reporter:datatype="text" />
6932                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
6933             </fields>
6934             <links>
6935                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6936             </links>
6937             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6938                 <actions>
6939                     <create permission="ADMIN_PROVIDER">
6940                         <context link="provider" field="owner"/>
6941                     </create>
6942                     <retrieve permission="ADMIN_PROVIDER">
6943                         <context link="provider" field="owner"/>
6944                     </retrieve>
6945                     <update permission="ADMIN_PROVIDER">
6946                         <context link="provider" field="owner"/>
6947                     </update>
6948                     <delete permission="ADMIN_PROVIDER">
6949                         <context link="provider" field="owner"/>
6950                     </delete>
6951                 </actions>
6952             </permacrud>
6953         </class>
6954         
6955         <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">
6956             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6957                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6958                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6959                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6960                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6961                 </fields>
6962                 <links/>
6963         </class>
6964
6965         <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">
6966                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
6967                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
6968                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
6969                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
6970                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
6971                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
6972                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
6973                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
6974                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
6975                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
6976                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
6977                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
6978                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
6979                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
6980                 </fields>
6981                 <links>
6982                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6983                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6984                 </links>
6985         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6986             <actions>
6987                 <create permission="ADMIN_PROVIDER">
6988                     <context link="provider" field="owner"/>
6989                 </create>
6990                 <retrieve permission="ADMIN_PROVIDER">
6991                     <context link="provider" field="owner"/>
6992                 </retrieve>
6993                 <update permission="ADMIN_PROVIDER">
6994                     <context link="provider" field="owner"/>
6995                 </update>
6996                 <delete permission="ADMIN_PROVIDER">
6997                     <context link="provider" field="owner"/>
6998                 </delete>
6999             </actions>
7000         </permacrud>
7001         </class>
7002
7003         <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">
7004                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
7005                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
7006                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
7007                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
7008                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
7009                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
7010                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
7011                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
7012                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
7013                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
7014                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
7015                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
7016                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
7017                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
7018                 </fields>
7019                 <links>
7020                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
7021                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7022                 </links>
7023         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7024             <actions>
7025                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7026                     <context link="account" jump="provider" field="owner"/>
7027                 </retrieve>
7028                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7029                     <context link="account" jump="provider" field="owner"/>
7030                 </update>
7031                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7032                     <context link="account" jump="provider" field="owner"/>
7033                 </delete>
7034             </actions>
7035         </permacrud>
7036         </class>
7037
7038
7039         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
7040                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
7041                         <field name="id" reporter:datatype="id" />
7042                         <field name="parent" reporter:datatype="link"/>
7043                         <field name="owner" reporter:datatype="link"/>
7044                         <field name="create_time" reporter:datatype="timestamp"/>
7045                         <field name="name" reporter:datatype="text"/>
7046                         <field name="shared" reporter:datatype="bool"/>
7047                         <field name="share_with" reporter:datatype="link"/>
7048                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7049                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7050                 </fields>
7051                 <links>
7052                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7053                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7054                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7055                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7056                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7057                 </links>
7058         </class>
7059         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7060                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7061                         <field name="id" reporter:datatype="id" />
7062                         <field name="parent" reporter:datatype="link"/>
7063                         <field name="owner" reporter:datatype="link"/>
7064                         <field name="create_time" reporter:datatype="timestamp"/>
7065                         <field name="name" reporter:datatype="text"/>
7066                         <field name="shared" reporter:datatype="bool"/>
7067                         <field name="share_with" reporter:datatype="link"/>
7068                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7069                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7070                 </fields>
7071                 <links>
7072                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7073                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7074                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7075                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7076                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7077                 </links>
7078         </class>
7079         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7080                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7081                         <field name="id" reporter:datatype="id" />
7082                         <field name="parent" reporter:datatype="link"/>
7083                         <field name="owner" reporter:datatype="link"/>
7084                         <field name="create_time" reporter:datatype="timestamp"/>
7085                         <field name="name" reporter:datatype="text"/>
7086                         <field name="shared" reporter:datatype="bool"/>
7087                         <field name="share_with" reporter:datatype="link"/>
7088                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7089                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7090                 </fields>
7091                 <links>
7092                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7093                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7094                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7095                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7096                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7097                 </links>
7098         </class>
7099         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7100                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7101                         <field name="id" reporter:datatype="id" />
7102                         <field name="owner" reporter:datatype="link"/>
7103                         <field name="create_time" reporter:datatype="timestamp"/>
7104                         <field name="name" reporter:datatype="text"/>
7105                         <field name="data" reporter:datatype="text"/>
7106                         <field name="folder" reporter:datatype="link"/>
7107                         <field name="description" reporter:datatype="text"/>
7108                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7109                 </fields>
7110                 <links>
7111                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7112                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7113                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7114                 </links>
7115         </class>
7116         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7117                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7118                         <field name="id" reporter:datatype="id" />
7119                         <field name="owner" reporter:datatype="link"/>
7120                         <field name="create_time" reporter:datatype="timestamp"/>
7121                         <field name="template" reporter:datatype="link"/>
7122                         <field name="data" reporter:datatype="text"/>
7123                         <field name="folder" reporter:datatype="link"/>
7124                         <field name="recur" reporter:datatype="bool"/>
7125                         <field name="recurrence" reporter:datatype="interval"/>
7126                         <field name="name" reporter:datatype="text"/>
7127                         <field name="description" reporter:datatype="text"/>
7128                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7129                 </fields>
7130                 <links>
7131                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7132                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7133                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7134                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7135                 </links>
7136         </class>
7137         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7138                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7139                         <field name="id" reporter:datatype="id" />
7140                         <field name="runner" reporter:datatype="link"/>
7141                         <field name="start_time" reporter:datatype="timestamp"/>
7142                         <field name="complete_time" reporter:datatype="timestamp"/>
7143                         <field name="run_time" reporter:datatype="timestamp"/>
7144                         <field name="email" reporter:datatype="text"/>
7145                         <field name="excel_format" reporter:datatype="bool"/>
7146                         <field name="csv_format" reporter:datatype="bool"/>
7147                         <field name="html_format" reporter:datatype="bool"/>
7148                         <field name="error_code" reporter:datatype="int"/>
7149                         <field name="error_text" reporter:datatype="text"/>
7150                         <field name="report" reporter:datatype="link"/>
7151                         <field name="folder" reporter:datatype="link"/>
7152                         <field name="chart_pie" reporter:datatype="bool"/>
7153                         <field name="chart_bar" reporter:datatype="bool"/>
7154                         <field name="chart_line" reporter:datatype="bool"/>
7155                 </fields>
7156                 <links>
7157                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7158                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7159                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7160                 </links>
7161         </class>
7162         <class id="rmsr" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
7163                 <fields oils_persist:primary="id">
7164                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7165                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7166                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7167                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7168                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7169                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7170                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7171                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7172                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7173                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7174                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7175                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7176                 </fields>
7177                 <links>
7178                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7179                 </links>
7180         </class>
7181         <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">
7182                 <fields oils_persist:primary="id">
7183                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7184                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7185                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7186                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7187                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7188                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7189                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7190                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7191                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7192                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7193                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7194                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7195                 </fields>
7196                 <links>
7197                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7198                 </links>
7199         </class>
7200         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7201                 <fields oils_persist:primary="id">
7202                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7203                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7204                         <field reporter:label="Fingerprint" name="fingerprint" />
7205                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7206                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7207                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7208                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7209                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7210                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7211                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7212                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7213                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7214                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7215                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7216                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7217                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7218                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7219                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7220                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7221                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7222                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7223                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7224                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7225                 </fields>
7226                 <links>
7227                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7228                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7229                 </links>
7230         </class>
7231         <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">
7232                 <fields oils_persist:primary="id">
7233                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7234                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7235                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7236                 </fields>
7237                 <links>
7238                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7239                 </links>
7240         </class>
7241         <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">
7242                 <fields oils_persist:primary="id">
7243                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7244                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7245                 </fields>
7246                 <links>
7247                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7248                 </links>
7249         </class>
7250         <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">
7251                 <fields oils_persist:primary="id">
7252                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7253                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7254                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7255                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7256                 </fields>
7257                 <links>
7258                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7259                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7260                 </links>
7261         </class>
7262         <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">
7263                 <fields oils_persist:primary="xact">
7264                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7265                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7266                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7267                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7268                 </fields>
7269                 <links>
7270                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7271                 </links>
7272         </class>
7273         <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">
7274                 <fields oils_persist:primary="xact">
7275                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7276                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7277                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7278                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7279                 </fields>
7280                 <links>
7281                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7282                 </links>
7283         </class>
7284         <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)">
7285                 <fields oils_persist:primary="id">
7286                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7287                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7288                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7289                 </fields>
7290                 <links>
7291                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7292                 </links>
7293         </class>
7294         <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">
7295                 <fields oils_persist:primary="id">
7296                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7297                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7298                 </fields>
7299                 <links>
7300                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7301                 </links>
7302         </class>
7303         <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">
7304                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7305                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7306                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7307                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7308                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7309                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7310                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7311                 </fields>
7312                 <links>
7313                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7314                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7315                 </links>
7316                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7317                         <actions>
7318                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7319                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7320                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7321                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7322                         </actions>
7323                 </permacrud>
7324         </class>
7325         <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">
7326                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7327                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7328                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7329                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7330                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7331                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7332                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7333                 </fields>
7334                 <links>
7335                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7336                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7337                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7338                 </links>
7339                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7340                         <actions>
7341                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7342                                         <context link="formula" field="owner"/>
7343                                 </create>
7344                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7345                                         <context link="formula" field="owner"/>
7346                                 </retrieve>
7347                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7348                                         <context link="formula" field="owner"/>
7349                                 </update>
7350                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7351                                         <context link="formula" field="owner"/>
7352                                 </delete>
7353                         </actions>
7354                 </permacrud>
7355         </class>
7356
7357         <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">
7358                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7359                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7360                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7361                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7362                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7363                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7364                 </fields>
7365                 <links>
7366                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7367                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7368                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7369                 </links>
7370                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7371                         <actions>
7372                                 <create permission="CREATE_PURCHASE_ORDER">
7373                                         <context link="formula" field="owner"/>
7374                 </create>
7375                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7376                                         <context link="formula" field="owner"/>
7377                 </retrieve>
7378                                 <update permission="CREATE_PURCHASE_ORDER">
7379                                         <context link="formula" field="owner"/>
7380                 </update>
7381                                 <delete permission="CREATE_PURCHASE_ORDER">
7382                                         <context link="formula" field="owner"/>
7383                 </delete>
7384                         </actions>
7385                 </permacrud>
7386         </class>
7387
7388         <class id="acqda" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
7389                 <fields oils_persist:primary="id">
7390                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7391                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7392                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7393                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7394                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7395                 </fields>
7396                 <links>
7397                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7398                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7399                 </links>
7400                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7401                 </permacrud>
7402         </class>
7403
7404         <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">
7405                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7406                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7407                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7408                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7409                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7410                 </fields>
7411                 <links>
7412                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7413                 </links>
7414                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7415                         <actions>
7416                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7417                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7418                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7419                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7420                         </actions>
7421                 </permacrud>
7422         </class>
7423
7424         <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">
7425                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7426                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7427                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7428                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7429                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7430                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
7431                 </fields>
7432                 <links>
7433                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7434                 </links>
7435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7436                         <actions>
7437                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7438                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7439                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7440                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7441                         </actions>
7442                 </permacrud>
7443         </class>
7444
7445         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7446                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7447                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7448                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7449                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7450                 </fields>
7451                 <links>
7452                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7453                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7454                 </links>
7455                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7456                 </permacrud>
7457         </class>
7458
7459         <class id="acqcle" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
7460                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7461                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7462                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7463                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7464                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7465                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7466                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7467                 </fields>
7468                 <links>
7469                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7470                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7471                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7472                 </links>
7473                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7474                 </permacrud>
7475         </class>
7476
7477         <class id="acqscl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
7478                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7479                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7480                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7481                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7482                 </fields>
7483                 <links>
7484                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7485                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7486                 </links>
7487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7488                 </permacrud>
7489         </class>
7490
7491         <class id="acqscle" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::serial_claim_event" oils_persist:tablename="acq.serial_claim_event" reporter:label="Serial Claim Event">
7492                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7493                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7494                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7495                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7496                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7497                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7498                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7499                 </fields>
7500                 <links>
7501                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7502                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7503                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7504                 </links>
7505                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7506                 </permacrud>
7507         </class>
7508
7509         <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">
7510                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7511                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7512                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7513                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7514                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7515                 </fields>
7516                 <links>
7517                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7518                 </links>
7519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7520             <actions>
7521                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7522                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
7523                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7524                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7525             </actions>
7526                 </permacrud>
7527         </class>
7528
7529         <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">
7530                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
7531                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
7532                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
7533                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
7534                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
7535                 </fields>
7536                 <links>
7537                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7538                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
7539                 </links>
7540                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7541                         <actions>
7542                                 <create permission="ADMIN_CLAIM_POLICY">
7543                                         <context link="claim_policy" field="org_unit"/>
7544                 </create>
7545                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
7546                                         <context link="claim_policy" field="org_unit"/>
7547                 </retrieve>
7548                                 <update permission="ADMIN_CLAIM_POLICY">
7549                                         <context link="claim_policy" field="org_unit"/>
7550                 </update>
7551                                 <delete permission="ADMIN_CLAIM_POLICY">
7552                                         <context link="claim_policy" field="org_unit"/>
7553                 </delete>
7554                         </actions>
7555                 </permacrud>
7556         </class>
7557
7558     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
7559         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
7560             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7561             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7562             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7563             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
7564             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7565             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
7566             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
7567             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
7568             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
7569             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
7570             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
7571             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
7572             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
7573             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
7574             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7575         </fields>
7576     </class>
7577
7578     <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">
7579         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
7580             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7581             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7582             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7583             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7584             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7585         </fields>
7586     </class>
7587
7588     <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">
7589         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
7590             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7591             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7592             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7593             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7594             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7595             <field reporter:label="City" name="city" reporter:datatype="text"/>
7596             <field reporter:label="State" name="state" reporter:datatype="text"/>
7597             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7598             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7599             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7600         </fields>
7601     </class>
7602
7603     <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">
7604         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
7605             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7606             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7607             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7608             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7609             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7610             <field reporter:label="City" name="city" reporter:datatype="text"/>
7611             <field reporter:label="State" name="state" reporter:datatype="text"/>
7612             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7613             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7614             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7615         </fields>
7616     </class>
7617
7618     <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">
7619         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
7620             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7621             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7622             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7623             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
7624             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
7625             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7626         </fields>
7627     </class>
7628
7629         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
7630                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
7631                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
7632                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7633                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7634                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
7635                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
7636                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
7637                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
7638                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
7639                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
7640                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
7641                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
7642                 </fields>
7643                 <links>
7644                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7645                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7646                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7647                 </links>
7648                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7649                 </permacrud>
7650         </class>
7651
7652         <class id="afscv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
7653                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
7654                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
7655                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
7656                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
7657                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
7658                 </fields>
7659                 <links>
7660                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
7661                 </links>
7662                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7663                 </permacrud>
7664         </class>
7665
7666     <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">
7667         <fields>
7668             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7669             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7670             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7671         </fields>
7672                 <links>
7673                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7674                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7675                 </links>
7676     </class>
7677
7678     <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">
7679         <fields>
7680             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7681             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
7682         </fields>
7683                 <links>
7684                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7685                 </links>
7686     </class>
7687
7688     <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">
7689         <fields>
7690             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7691             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7692             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7693         </fields>
7694                 <links>
7695                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7696                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7697                 </links>
7698     </class>
7699
7700     <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">
7701         <fields>
7702             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7703             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
7704         </fields>
7705                 <links>
7706                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7707                 </links>
7708     </class>
7709
7710     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
7711                 <oils_persist:source_definition>
7712
7713             SELECT  DISTINCT l.*
7714               FROM  action.unfulfilled_hold_loops l
7715                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
7716               WHERE l.count = m.max
7717
7718                 </oils_persist:source_definition>
7719         <fields>
7720             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7721             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7722             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7723         </fields>
7724                 <links>
7725                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7726                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7727                 </links>
7728     </class>
7729
7730         <class id="qsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
7731                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
7732                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
7733                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
7734                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
7735                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
7736                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
7737                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
7738                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
7739                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
7740                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
7741                 </fields>
7742                 <links>
7743                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
7744                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
7745                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
7746                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
7747                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
7748                 </links>
7749                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7750                 </permacrud>
7751         </class>
7752
7753         <class id="qseq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
7754                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
7755                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
7756                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
7757                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7758                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
7759                 </fields>
7760                 <links>
7761                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
7762                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
7763                 </links>
7764                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7765                 </permacrud>
7766         </class>
7767
7768         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
7769                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
7770                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
7771                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
7772                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
7773                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
7774                 </fields>
7775                 <links>
7776                 </links>
7777                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7778                 </permacrud>
7779         </class>
7780
7781         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
7782                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
7783                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
7784                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
7785                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7786                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
7787                 </fields>
7788                 <links>
7789                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
7790                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
7791                 </links>
7792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7793                 </permacrud>
7794         </class>
7795         
7796         <class id="qfs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
7797                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
7798                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
7799                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
7800                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
7801                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
7802                 </fields>
7803                 <links>
7804                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
7805                 </links>
7806                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7807                 </permacrud>
7808         </class>
7809         
7810         <class id="qfpd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::function_param_def" oils_persist:tablename="query.function_param_def" reporter:label="Function Parameter Definition">
7811                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
7812                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
7813                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7814                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7815                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
7816                 </fields>
7817                 <links>
7818                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7819                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
7820                 </links>
7821                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7822                 </permacrud>
7823         </class>
7824
7825         <class id="qbv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
7826                 <fields oils_persist:primary="name">
7827                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
7828                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7829                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
7830                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7831                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
7832                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
7833                 </fields>
7834                 <links>
7835                 </links>
7836                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7837                 </permacrud>
7838         </class>
7839
7840         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
7841                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7842                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7843                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
7844                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7845                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7846                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7847                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7848                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7849                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7850                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7851                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7852                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
7853                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7854                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7855                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7856                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7857                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7858                 </fields>
7859                 <links>
7860                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7861                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7862                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
7863                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7864                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7865                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7866                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7867                 </links>
7868                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7869                 </permacrud>
7870         </class>
7871
7872         <class id="qcb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
7873                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
7874                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
7875                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7876                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7877                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
7878                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
7879                 </fields>
7880                 <links>
7881                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7882                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
7883                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
7884                 </links>
7885                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7886                 </permacrud>
7887         </class>
7888
7889         <class id="qfr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
7890                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
7891                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
7892                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
7893                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
7894                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
7895                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
7896                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
7897                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7898                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
7899                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7900                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
7901                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
7902                 </fields>
7903                 <links>
7904                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7905                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
7906                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
7907                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
7908                 </links>
7909                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7910                 </permacrud>
7911         </class>
7912
7913         <class id="qrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
7914                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
7915                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
7916                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
7917                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7918                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7919                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
7920                 </fields>
7921                 <links>
7922                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
7923                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
7924                 </links>
7925                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7926                 </permacrud>
7927         </class>
7928
7929         <class id="qsi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
7930                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
7931                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
7932                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7933                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7934                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7935                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
7936                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
7937                 </fields>
7938                 <links>
7939                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7940                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7941                 </links>
7942                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7943                 </permacrud>
7944         </class>
7945
7946         <class id="qobi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::order_by_item" oils_persist:tablename="query.order_by_item" reporter:label="Order By Item">
7947                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
7948                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
7949                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7950                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7951                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7952                 </fields>
7953                 <links>
7954                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7955                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7956                 </links>
7957                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7958                 </permacrud>
7959         </class>
7960
7961         <class id="xbet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
7962                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7963                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7964                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7965                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7966                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7967                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7968                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7969                 </fields>
7970                 <links>
7971                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7972                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7973                 </links>
7974                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7975                 </permacrud>
7976         </class>
7977
7978         <class id="xbind" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
7979                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7980                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7981                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7982                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7983                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7984                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7985                 </fields>
7986                 <links>
7987                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7988                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7989                 </links>
7990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7991                 </permacrud>
7992         </class>
7993
7994         <class id="xbool" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
7995                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7996                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7997                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7998                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7999                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8000                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8001                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8002                 </fields>
8003                 <links>
8004                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8005                 </links>
8006                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8007                 </permacrud>
8008         </class>
8009
8010         <class id="xcase" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
8011                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8012                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8013                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8014                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8015                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8016                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8017                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8018                 </fields>
8019                 <links>
8020                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8021                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8022                 </links>
8023                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8024                 </permacrud>
8025         </class>
8026
8027         <class id="xcast" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
8028                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8029                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8030                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8031                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8032                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8033                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8034                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8035                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8036                 </fields>
8037                 <links>
8038                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8039                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8040                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8041                 </links>
8042                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8043                 </permacrud>
8044         </class>
8045
8046         <class id="xcol" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
8047                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8048                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8049                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8050                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8051                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8052                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8053                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8054                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8055                 </fields>
8056                 <links>
8057                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8058                 </links>
8059                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8060                 </permacrud>
8061         </class>
8062
8063         <class id="xex" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
8064                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8065                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8066                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8067                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8068                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8069                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8070                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8071                 </fields>
8072                 <links>
8073                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8074                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8075                 </links>
8076                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8077                 </permacrud>
8078         </class>
8079
8080         <class id="xfunc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
8081                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8082                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8083                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8084                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8085                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8086                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8087                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8088                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8089                 </fields>
8090                 <links>
8091                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8092                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8093                 </links>
8094                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8095                 </permacrud>
8096         </class>
8097
8098         <class id="xin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
8099                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8100                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8101                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8102                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8103                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8104                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8105                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8106                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8107                 </fields>
8108                 <links>
8109                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8110                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8111                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8112                 </links>
8113                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8114                 </permacrud>
8115         </class>
8116
8117         <class id="xisnull" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
8118                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8119                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8120                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8121                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8122                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8123                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8124                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8125                 </fields>
8126                 <links>
8127                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8128                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8129                 </links>
8130                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8131                 </permacrud>
8132         </class>
8133
8134         <class id="xnull" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
8135                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8136                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8137                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8138                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8139                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8140                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8141                 </fields>
8142                 <links>
8143                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8144                 </links>
8145                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8146                 </permacrud>
8147         </class>
8148
8149         <class id="xnum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
8150                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8151                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8152                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8153                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8154                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8155                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8156                 </fields>
8157                 <links>
8158                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8159                 </links>
8160                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8161                 </permacrud>
8162         </class>
8163
8164         <class id="xop" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
8165                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8166                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8167                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8168                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8169                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8170                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8171                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8172                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8173                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8174                 </fields>
8175                 <links>
8176                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8177                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8178                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8179                 </links>
8180                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8181                 </permacrud>
8182         </class>
8183
8184         <class id="xser" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
8185                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8186                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8187                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8188                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8189                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8190                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8191                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8192                 </fields>
8193                 <links>
8194                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8195                 </links>
8196                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8197                 </permacrud>
8198         </class>
8199
8200         <class id="xstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
8201                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8202                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8203                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8204                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8205                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8206                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8207                 </fields>
8208                 <links>
8209                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8210                 </links>
8211                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8212                 </permacrud>
8213         </class>
8214
8215         <class id="xsubq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
8216                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8217                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8218                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8219                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8220                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8221                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8222                 </fields>
8223                 <links>
8224                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8225                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8226                 </links>
8227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8228                 </permacrud>
8229         </class>
8230
8231         <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">
8232                 <fields oils_persist:primary="id">
8233                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8234                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8235                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8236                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8237                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8238                 </fields>
8239                 <links>
8240                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8241                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8242                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8243                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8244                 </links>
8245         </class>
8246
8247         <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">
8248                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8249                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8250                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8251                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8252                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8253                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8254                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8255                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8256                 </fields>
8257                 <links/>
8258                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8259                         <actions>
8260                                 <retrieve/>
8261                         </actions>
8262                 </permacrud>
8263         </class>
8264
8265         <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">
8266                 <fields oils_persist:primary="ptype_key">
8267                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8268                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8269                 </fields>
8270                 <links/>
8271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8272                         <actions>
8273                                 <retrieve/>
8274                         </actions>
8275                 </permacrud>
8276         </class>
8277
8278         <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">
8279                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8280                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8281                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8282                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8283                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8284                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8285                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8286                 </fields>
8287                 <links>
8288                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8289                 </links>
8290                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8291                         <actions>
8292                                 <retrieve/>
8293                         </actions>
8294                 </permacrud>
8295         </class>
8296
8297         <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">
8298                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8299                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8300                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8301                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8302                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8303                 </fields>
8304                 <links>
8305                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8306                 </links>
8307                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8308                         <actions>
8309                                 <retrieve/>
8310                         </actions>
8311                 </permacrud>
8312         </class>
8313
8314         <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">
8315                 <fields oils_persist:primary="code">
8316                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8317                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8318                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8319                 </fields>
8320                 <links/>
8321                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8322                         <actions>
8323                                 <retrieve/>
8324                         </actions>
8325                 </permacrud>
8326         </class>
8327
8328         <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">
8329                 <oils_persist:source_definition>
8330
8331             SELECT  b.id,
8332                     MAX(dcp.edit_date) AS last_delete_date
8333              FROM   biblio.record_entry b
8334                     JOIN asset.call_number cn ON (cn.record = b.id)
8335                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8336              WHERE  NOT b.deleted
8337              GROUP BY b.id
8338              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8339
8340                 </oils_persist:source_definition>
8341                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8342                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8343                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8344                 </fields>
8345                 <links>
8346                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8347                 </links>
8348                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8349                         <actions>
8350                                 <retrieve/>
8351                         </actions>
8352                 </permacrud>
8353         </class>
8354
8355         <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">
8356                 <oils_persist:source_definition>
8357
8358             -- -- 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.
8359             -- -- 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
8360             -- -- may not.
8361             -- SELECT
8362             --     bre.id AS "bib_id",
8363             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8364             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8365             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8366             -- FROM (
8367                 SELECT
8368                     y.bre AS "id",
8369                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8370                     y.hold_count AS "hold_count",
8371                     (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"
8372                 FROM (
8373                         SELECT
8374                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8375                             COUNT(*) AS "hold_count"
8376                         FROM action.hold_request h
8377                         WHERE
8378                             cancel_time IS NULL
8379                             AND fulfillment_time IS NULL
8380                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8381                         GROUP BY 1
8382                     )y LEFT JOIN (
8383                         SELECT 
8384                             (SELECT id
8385                                 FROM biblio.record_entry 
8386                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8387                             ) AS "bre", 
8388                             COUNT(*) AS "copy_count"
8389                         FROM asset.copy
8390                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8391                         WHERE copy.holdable 
8392                             AND NOT copy.deleted 
8393                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8394                         GROUP BY 1
8395                     )x ON x.bre = y.bre
8396                 -- )z RIGHT JOIN (
8397                 --     SELECT id
8398                 --     FROM biblio.record_entry
8399                 --     WHERE NOT deleted
8400                 -- )bre ON (z.bib_id = bre.id)
8401                 
8402
8403                 </oils_persist:source_definition>
8404                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8405                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8406                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8407                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8408                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8409                 </fields>
8410                 <links>
8411                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8412                 </links>
8413                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8414                         <actions>
8415                                 <retrieve/>
8416                         </actions>
8417                 </permacrud>
8418         </class>
8419
8420         <!-- ********************************************************************************************************************* -->
8421         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8422         <!-- ********************************************************************************************************************* -->
8423         <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">
8424                 <fields oils_persist:primary="id">
8425                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8426                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8427                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8428                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8429                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8430                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8431                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8432                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8433                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8434                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8435                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8436                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8437                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8438                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8439                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8440                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8441                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8442                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8443                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8444                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8445                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8446                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8447                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8448                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8449                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8450                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8451                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8452                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8453                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8454                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8455                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8456                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8457                 </fields>
8458                 <links>
8459                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8460                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8461                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8462                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8463                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8464                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8465                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8466                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8467                 </links>
8468         </class>
8469
8470         <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">
8471                 <fields oils_persist:primary="id">
8472                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8473                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8474                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8475                 </fields>
8476                 <links>
8477                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8478                 </links>
8479         </class>
8480
8481         <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">
8482                 <fields oils_persist:primary="id">
8483                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8484                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8485                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8486                 </fields>
8487                 <links>
8488                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8489                 </links>
8490         </class>
8491
8492         <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">
8493                 <fields oils_persist:primary="id">
8494                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8495
8496                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
8497                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
8498                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
8499
8500                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
8501                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
8502                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
8503
8504                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
8505                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
8506
8507                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8508                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
8509                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
8510
8511                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
8512                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
8513
8514                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
8515                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
8516                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
8517
8518                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
8519                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
8520                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
8521
8522                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8523                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
8524                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
8525                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
8526
8527                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
8528                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
8529
8530                 </fields>
8531                 <links>
8532                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
8533                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8534                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
8535                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
8536                 </links>
8537         </class>
8538
8539         <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">
8540                 <oils_persist:source_definition>
8541
8542             SELECT
8543                 po.ordering_agency AS ordering_agency,
8544                 po.id AS purchase_order,
8545                 li.id AS lineitem,
8546                 lid.id AS lineitem_detail,
8547                 cpa.id AS claim_policy_action
8548             FROM
8549                 acq.lineitem_detail lid
8550                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
8551                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
8552                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
8553                 JOIN acq.claim_policy_action cpa ON (
8554                     cpa.claim_policy = cp.id
8555
8556                     -- we only care about claim policy actions whose claim
8557                     -- interval we'd reached or exceeded
8558                     AND (NOW() - cpa.action_interval) &gt; po.order_date
8559
8560                     -- filter out all claim policy actions where claim events
8561                     -- have occurred on or after the action's action_interval
8562                     AND NOT EXISTS (
8563                         SELECT 1
8564                         FROM
8565                             acq.claim_event evt
8566                             JOIN acq.claim claim ON (
8567                                 claim.id = evt.claim
8568                                 AND claim.lineitem_detail = lid.id
8569                             )
8570                         WHERE
8571                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
8572                     )
8573                 )
8574             WHERE
8575                 lid.cancel_reason IS NULL
8576                 AND li.cancel_reason IS NULL -- belt/suspenders
8577                 AND po.cancel_reason IS NULL -- belt/suspenders
8578                 AND lid.recv_time IS NULL
8579                 AND po.state = 'on-order'
8580             ORDER BY 1, 2, 3, 4, 5
8581
8582                 </oils_persist:source_definition>
8583                 <fields>
8584                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8585                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8586                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8587                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8588                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
8589                 </fields>
8590                 <links>
8591                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8592                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8593                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8594                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8595                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
8596                 </links>
8597         </class>
8598
8599         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
8600                 <oils_persist:source_definition>
8601
8602             SELECT 
8603                 li.id AS lineitem, 
8604                 (
8605                     SELECT COUNT(lid.id) 
8606                     FROM acq.lineitem_detail lid
8607                     WHERE lineitem = li.id
8608                 ) AS item_count,
8609                 (
8610                     SELECT COUNT(lid.id) 
8611                     FROM acq.lineitem_detail lid
8612                     WHERE recv_time IS NOT NULL AND lineitem = li.id
8613                 ) AS recv_count,
8614                 (
8615                     SELECT COUNT(lid.id) 
8616                     FROM acq.lineitem_detail lid
8617                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
8618                 ) AS cancel_count,
8619                 (
8620                     SELECT COUNT(lid.id) 
8621                     FROM acq.lineitem_detail lid
8622                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8623                     WHERE NOT debit.encumbrance AND lineitem = li.id
8624                 ) AS invoice_count,
8625                 (
8626                     SELECT COUNT(DISTINCT(lid.id)) 
8627                     FROM acq.lineitem_detail lid
8628                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
8629                     WHERE lineitem = li.id
8630                 ) AS claim_count,
8631                 (
8632                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
8633                     FROM acq.lineitem_detail lid
8634                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
8635                 ) AS estimated_amount,
8636                 (
8637                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8638                     FROM acq.lineitem_detail lid
8639                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8640                     WHERE debit.encumbrance AND lineitem = li.id
8641                 ) AS encumbrance_amount,
8642                 (
8643                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8644                     FROM acq.lineitem_detail lid
8645                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8646                     WHERE NOT debit.encumbrance AND lineitem = li.id
8647                 ) AS paid_amount
8648
8649                 FROM acq.lineitem AS li
8650         </oils_persist:source_definition>
8651                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
8652                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8653                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8654                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
8655                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
8656                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
8657                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
8658                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
8659                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
8660                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
8661                 </fields>
8662                 <links>
8663                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8664                 </links>
8665     </class>
8666
8667
8668         <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">
8669                 <oils_persist:source_definition>
8670
8671                         SELECT  t.*
8672                           FROM  action.transit_copy t
8673                                 JOIN actor.org_unit AS s ON (t.source = s.id)
8674                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
8675                           WHERE s.parent_ou &lt;&gt; d.parent_ou
8676
8677                 </oils_persist:source_definition>
8678                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8679                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
8680                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
8681                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8682                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
8683                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
8684                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
8685                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
8686                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8687                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8688                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8689                 </fields>
8690                 <links>
8691                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
8692                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8693                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8694                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8695                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8696                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
8697                 </links>
8698         </class>
8699
8700     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
8701                 <oils_persist:source_definition>
8702
8703         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
8704                 SELECT
8705                         cp.id as copy,
8706                         COUNT(circ.id),
8707                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8708                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8709                 FROM
8710                         asset.copy cp
8711                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
8712                 GROUP BY 1, 3, 4
8713                 UNION
8714                 SELECT
8715                         cp.id as copy,
8716                         COUNT(circ.id),
8717                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8718                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8719                 FROM
8720                         asset.copy cp
8721                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
8722                 GROUP BY 1, 3, 4
8723                 UNION
8724                 SELECT
8725                         id as copy,
8726                         circ_count,
8727                         -1 AS year,
8728                         false as is_renewal
8729                 FROM
8730                         extend_reporter.legacy_circ_count
8731         )x GROUP BY 1, 3, 4
8732
8733                 </oils_persist:source_definition>
8734         <fields>
8735             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
8736             <field reporter:label="Count" name="count" reporter:datatype="int"/>
8737             <field reporter:label="Year" name="year" reporter:datatype="int"/>
8738             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
8739         </fields>
8740                 <links>
8741                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8742                 </links>
8743                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8744                         <actions>
8745                                 <retrieve/>
8746                         </actions>
8747                 </permacrud>
8748     </class>
8749
8750         <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">
8751                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
8752                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
8753                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
8754                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
8755                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8756                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
8757                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
8758                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
8759                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
8760                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
8761                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
8762                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
8763                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
8764                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
8765                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
8766                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
8767                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
8768                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
8769                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
8770                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
8771                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
8772                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
8773                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
8774                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
8775                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
8776                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
8777                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
8778                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
8779                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
8780                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
8781                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
8782                 </fields>
8783                 <links>
8784                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
8785                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
8786                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
8787                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8788                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
8789                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8790                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8791                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
8792                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
8793                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
8794                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
8795                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
8796                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
8797                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
8798                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
8799                 </links>
8800         </class>
8801
8802     <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">
8803         <fields oils_persist:primary="id">
8804             <field reporter:label="Title" name="title" reporter:datatype="text"/>
8805             <field reporter:label="Author" name="author" reporter:datatype="text"/>
8806             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
8807             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
8808             <field reporter:label="Price" name="price" reporter:datatype="money"/>
8809             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8810             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
8811             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
8812             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8813             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
8814             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8815             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
8816             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
8817             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
8818             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8819             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8820             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8821             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8822             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
8823             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
8824             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
8825             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
8826             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8827             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
8828             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
8829             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
8830             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
8831             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
8832             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
8833             <field reporter:label="Status" name="status" reporter:datatype="link"/>
8834             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
8835             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
8836             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
8837             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
8838         </fields>
8839         <links>
8840             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8841             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8842             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8843             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8844             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8845         </links>
8846     </class>
8847
8848     <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">
8849         <fields oils_persist:primary="id">
8850             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8851             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8852             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8853             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8854         </fields>
8855         <links>
8856             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8857             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8858         </links>
8859     </class>
8860
8861     <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">
8862         <fields oils_persist:primary="owning_lib">
8863             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8864             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8865             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8866         </fields>
8867         <links>
8868             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8869         </links>
8870     </class>
8871
8872     <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">
8873         <fields oils_persist:primary="id">
8874             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8875             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8876             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8877             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8878             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8879         </fields>
8880         <links>
8881             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8882             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8883             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8884         </links>
8885     </class>
8886
8887     <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">
8888         <fields oils_persist:primary="circ_lib">
8889             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8890             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8891             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8892             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8893         </fields>
8894         <links>
8895             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8896             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8897         </links>
8898     </class>
8899
8900     <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">
8901         <fields oils_persist:primary="id">
8902             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8903             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8904             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8905             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8906             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8907         </fields>
8908         <links>
8909             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8910             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8911             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8912         </links>
8913     </class>
8914
8915     <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">
8916         <fields oils_persist:primary="home_ou">
8917             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8918             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8919             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8920             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8921         </fields>
8922         <links>
8923             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8924             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8925         </links>
8926     </class>
8927         <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">
8928                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
8929                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
8930                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
8931                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
8932                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
8933                 </fields>
8934                 <links>
8935                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8936                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
8937                 </links>
8938                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8939                         <actions>
8940                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8941                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
8942                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8943                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8944                         </actions>
8945                 </permacrud>
8946         </class>
8947         <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">
8948                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
8949                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
8950                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
8951                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
8952                 </fields>
8953                 <links>
8954                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8955                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
8956                         </links>
8957                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8958                 <actions>
8959                                 <create permission="ADMIN_ACQ_FUND_TAG">
8960                                         <context link="tag" field="owner"/>
8961                                 </create>
8962                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8963                                         <context link="tag" field="owner"/>
8964                                 </retrieve>
8965                                 <update permission="ADMIN_ACQ_FUND_TAG">
8966                                         <context link="tag" field="owner"/>
8967                                 </update>
8968                                 <delete permission="ADMIN_ACQ_FUND_TAG">
8969                                         <context link="tag" field="owner"/>
8970                                 </delete>
8971                         </actions>
8972                 </permacrud>
8973         </class>
8974         <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">
8975                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
8976                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8977                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
8978                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
8979                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
8980                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
8981                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8982                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
8983                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
8984                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
8985                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
8986                 </fields>
8987                 <links>
8988                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8989                 </links>
8990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8991                         <actions>
8992                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
8993                                 <retrieve/>
8994                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
8995                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
8996                         </actions>
8997                 </permacrud>
8998         </class>
8999
9000         <!-- ********************************************************************************************************************* -->
9001
9002 </IDL>
9003
9004 <!--
9005     vim:noet:ts=4:sw=4:
9006 -->