]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Add table and columns for tracking current import/overlay errors per object
[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                 </fields>
152                 <links>
153                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
154                 </links>
155                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
156                         <actions>
157                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
158                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
159                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
160                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
161                         </actions>
162                 </permacrud>
163         </class>
164
165         <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">
166                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
167                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
168                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
169                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
170                 </fields>
171                 <links>
172                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
173                 </links>
174                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
175                         <actions>
176                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
177                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
178                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
179                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
180                         </actions>
181                 </permacrud>
182         </class>
183
184         <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">
185                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
186                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
187                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
188                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
189                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
190                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
191                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
192                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
193                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
194                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
195                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
196                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
197                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
198                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
199                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
200                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
201                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
202                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
203                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
204                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
205                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
206                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
207                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
208                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
209                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
210                 </fields>
211                 <links>
212                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
213                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
214                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
215                 </links>
216                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
217                         <actions>
218                                 <create permission="CREATE_IMPORT_ITEM">
219                     <context link="definition" field="owner"/>
220                                 </create>
221                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
222                     <context link="definition" field="owner"/>
223                                 </retrieve>
224                                 <update permission="UPDATE_IMPORT_ITEM">
225                     <context link="definition" field="owner"/>
226                                 </update>
227                                 <delete permission="DELETE_IMPORT_ITEM">
228                     <context link="definition" field="owner"/>
229                                 </delete>
230                         </actions>
231                 </permacrud>
232         </class>
233
234         <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">
235                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
236                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
237                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
238                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
239                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
240                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
241                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
242                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
243                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
244                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
245                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
246                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
247                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
248                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
249                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
250                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
251                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
252                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
253                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
254                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
255                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
256                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
257                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
258                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
259                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
260                 </fields>
261                 <links>
262                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
263                 </links>
264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
265                         <actions>
266                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
267                                 <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"/>
268                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
269                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
270                         </actions>
271                 </permacrud>
272         </class>
273
274         <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">
275                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
276                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
277                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
278                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
279                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
280                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
281                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
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                 </fields>
332                 <links>
333                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
334                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
335                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
336                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
337             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
338             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
339                 </links>
340                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
341                         <actions>
342                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
343                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
344                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
345                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
346                         </actions>
347                 </permacrud>
348         </class>
349
350         <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">
351                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
352                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
353                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
354                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
355                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
356                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
357                 </fields>
358                 <links/>
359                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
360                         <actions>
361                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
362                 <retrieve/>
363                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
364                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
365                         </actions>
366                 </permacrud>
367         </class>
368
369         <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">
370                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
371                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
372                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
373                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
374                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
375                 </fields>
376                 <links>
377                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
378                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
379                 </links>
380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
381                         <actions>
382                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
383                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
384                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
385                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
386                         </actions>
387                 </permacrud>
388         </class>
389
390         <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">
391                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
392                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
393                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
394                         <field reporter:label="Matched Set" name="matched_set" reporter:datatype="link"/>
395                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
396                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
397                 </fields>
398                 <links>
399                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
400                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
401                         <link field="matched_set" reltype="has_a" key="id" map="" class="vms"/>
402                 </links>
403                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
404                         <actions>
405                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
406                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
407                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
408                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
409                         </actions>
410                 </permacrud>
411         </class>
412
413         <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">
414                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
415                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
416                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
417                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
418                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
419                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
420                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
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                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
476                 </fields>
477                 <links/>
478                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
479                         <actions>
480                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
481                 <retrieve/>
482                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
483                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
484                         </actions>
485                 </permacrud>
486         </class>
487
488         <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">
489                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
490                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
491                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
492                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
493                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
494                 </fields>
495                 <links>
496                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
497                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
498                 </links>
499                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
500                         <actions>
501                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
502                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
503                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
504                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
505                         </actions>
506                 </permacrud>
507         </class>
508
509         <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">
510                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
511                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
512                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
513                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
514                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
515                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
516                 </fields>
517                 <links>
518                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
519                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
520                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
521                 </links>
522                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
523                         <actions>
524                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
525                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
526                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
527                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
528                         </actions>
529                 </permacrud>
530         </class>
531
532         <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">
533                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
534                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id"/>
535                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
536                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
537                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
538                 </fields>
539                 <links>
540                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
541                 </links>
542                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
543                         <actions>
544                                 <create permission="CREATE_IMPORT_MATCH_SET ADMIN_IMPORT_IMPORT_MATCH_SET" context_field="owner"/>
545                                 <retrieve permission="CREATE_IMPORT_MATCH_SET UPDATE_IMPORT_MATCH_SET DELETE_IMPORT_MATCH_SET" context_field="owner"/>
546                                 <update permission="UPDATE_IMPORT_MATCH_SET" context_field="owner"/>
547                                 <delete permission="DELETE_IMPORT_MATCH_SET" context_field="owner"/>
548                         </actions>
549                 </permacrud>
550         </class>
551
552         <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">
553                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
554                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
555                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
556                         <field reporter:label="Coded Field" name="svf" reporter:datatype="text"/>
557                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
558                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
559                         <field reporter:label="Required?" name="required" reporter:datatype="bool"/>
560                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
561                 </fields>
562                 <links>
563                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
564                 </links>
565                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
566                         <actions>
567                                 <create permission="CREATE_IMPORT_MATCH_SET ADMIN_IMPORT_IMPORT_MATCH_SET" context_field="owner"/>
568                                 <retrieve permission="CREATE_IMPORT_MATCH_SET UPDATE_IMPORT_MATCH_SET DELETE_IMPORT_MATCH_SET" context_field="owner"/>
569                                 <update permission="UPDATE_IMPORT_MATCH_SET" context_field="owner"/>
570                                 <delete permission="DELETE_IMPORT_MATCH_SET" context_field="owner"/>
571                         </actions>
572                 </permacrud>
573         </class>
574
575         <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">
576                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
577                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
578                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
579                         <field reporter:label="Coded Field" name="svf" reporter:datatype="text"/>
580                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
581                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
582                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
583                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
584                 </fields>
585                 <links>
586                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
587                 </links>
588                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
589                         <actions>
590                                 <create permission="CREATE_IMPORT_MATCH_SET ADMIN_IMPORT_IMPORT_MATCH_SET" context_field="owner"/>
591                                 <retrieve permission="CREATE_IMPORT_MATCH_SET UPDATE_IMPORT_MATCH_SET DELETE_IMPORT_MATCH_SET" context_field="owner"/>
592                                 <update permission="UPDATE_IMPORT_MATCH_SET" context_field="owner"/>
593                                 <delete permission="DELETE_IMPORT_MATCH_SET" context_field="owner"/>
594                         </actions>
595                 </permacrud>
596         </class>
597
598         <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">
599                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
600                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
601                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
602                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
603                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
604                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
605                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
606                 </fields>
607                 <links>
608                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
609                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
610                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
611                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
612                 </links>
613         </class>
614
615     <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">
616         <fields oils_persist:primary="name">
617             <field reporter:label="Name" name="name" reporter:datatype="text"/>
618             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
619             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
620             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
621         </fields>
622         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
623             <actions>
624                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
625                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
626                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
627                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
628             </actions>
629         </permacrud>
630     </class>
631
632     <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">
633         <fields oils_persist:primary="id">
634             <field reporter:label="ID" name="id" reporter:datatype="id"/>
635             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
636             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
637             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
638             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
639         </fields>
640         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
641             <actions>
642                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
643                 <retrieve/>
644                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
645                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
646             </actions>
647         </permacrud>
648     </class>
649
650         <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">
651                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
652                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
653                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
654                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
655                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
656                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
657                 </fields>
658                 <links>
659                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
660                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
661                 </links>
662         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
663             <actions>
664                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
665                 <retrieve/>
666                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
667                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
668             </actions>
669         </permacrud>
670         </class>
671
672         <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">
673                 <fields oils_persist:primary="name">
674                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
675                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
676                         <field reporter:label="Description" name="description" reporter:datatype="text" />
677                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
678                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
679                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
680                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
681                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
682                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
683                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
684                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
685                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
686                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
687                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
688                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
689                 </fields>
690                 <links>
691                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
692                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
693                 </links>
694         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
695             <actions>
696                 <create permission="ADMIN_SVF" global_required="true"/>
697                 <retrieve/>
698                 <update permission="ADMIN_SVF" global_required="true"/>
699                 <delete permission="ADMIN_SVF" global_required="true"/>
700             </actions>
701         </permacrud>
702         </class>
703
704         <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">
705                 <fields oils_persist:primary="id">
706                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
707                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
708                 </fields>
709                 <links>
710                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
711                 </links>
712         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
713             <actions>
714                 <retrieve/>
715             </actions>
716         </permacrud>
717         </class>
718
719         <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">
720                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
721                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
722                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
723                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
724                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
725                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
726                 </fields>
727                 <links>
728                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
729                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
730                 </links>
731         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
732             <actions>
733                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
734                 <retrieve/>
735                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
736                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
737             </actions>
738         </permacrud>
739         </class>
740
741         <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">
742                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
743                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
744                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
745                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
746                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
747                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
748                 </fields>
749                 <links>
750                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
751                 </links>
752         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
753             <actions>
754                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
755                 <retrieve/>
756                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
757                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
758             </actions>
759         </permacrud>
760         </class>
761
762         <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">
763                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
764                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
765                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
766                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
767                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
768                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
769                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
770                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
771                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
772                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
773                 </fields>
774                 <links>
775                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
776                 </links>
777         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
778             <actions>
779                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
780                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
781                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
782                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
783             </actions>
784         </permacrud>
785         </class>
786
787     <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">
788         <fields oils_persist:primary="name">
789             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
790             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
791             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
792             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
793             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
794             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
795             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
796             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
797             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
798         </fields>
799         <links>
800             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
801         </links>
802         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
803             <actions>
804                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
805                 <retrieve/>
806                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
807                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
808             </actions>
809         </permacrud>
810     </class>
811
812     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
813         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
814             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
815             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
816             <field reporter:label="Name" name="name" reporter:datatype="text"/>
817             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
818             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
819             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
820             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
821         </fields>
822         <links>
823             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
824         </links>
825     </class>
826
827         <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">
828                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
829                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
830                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
831                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
832                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
833                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
834                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
835                 </fields>
836                 <links>
837             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
838             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
839                 </links>
840                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
841                         <actions>
842                                 <retrieve/>
843                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
844                         </actions>
845                 </permacrud>
846         </class>
847
848         <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">
849                 <fields oils_persist:primary="key">
850                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
851                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
852                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
853                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
854                 </fields>
855                 <links/>
856                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
857                         <actions>
858                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
859                                 <retrieve/>
860                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
861                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
862                         </actions>
863                 </permacrud>
864         </class>
865
866         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
867                 <fields oils_persist:primary="module">
868                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
869                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
870                 </fields>
871                 <links/>
872         </class>
873
874         <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">
875                 <fields oils_persist:primary="module">
876                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
877                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
878                 </fields>
879                 <links/>
880                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
881                         <actions>
882                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
883                                 <retrieve/>
884                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
885                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
886                         </actions>
887                 </permacrud>
888         </class>
889
890         <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">
891                 <fields oils_persist:primary="module">
892                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
893                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
894                 </fields>
895                 <links/>
896                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
897                         <actions>
898                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
899                                 <retrieve/>
900                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
901                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
902                         </actions>
903                 </permacrud>
904         </class>
905
906         <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">
907                 <fields oils_persist:primary="module">
908                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
909                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
910                 </fields>
911                 <links/>
912                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
913                         <actions>
914                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
915                                 <retrieve/>
916                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
917                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
918                         </actions>
919                 </permacrud>
920         </class>
921
922         <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">
923                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
924                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
925                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
926                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
927                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
928                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
929                 </fields>
930                 <links>
931                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
932                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
933                 </links>
934                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
935                         <actions>
936                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
937                     <context link="event_def" field="owner"/>
938                 </create>
939                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
940                     <context link="event_def" field="owner"/>
941                 </retrieve>
942                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
943                     <context link="event_def" field="owner"/>
944                 </update>
945                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
946                     <context link="event_def" field="owner"/>
947                 </delete>
948                         </actions>
949                 </permacrud>
950         </class>
951
952         <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">
953                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
954                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
955                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
956                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
957                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
958                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
959                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
960                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
961                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
962                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
963                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
964                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
965                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
966                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
967                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
968                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
969                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
970                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
971                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
972                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
973                 </fields>
974                 <links>
975                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
976                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
977                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
978                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
979                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
980                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
981                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
982                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
983                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
984                 </links>
985                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
986                         <actions>
987                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
988                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
989                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
990                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
991                         </actions>
992                 </permacrud>
993         </class>
994
995         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
996                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
997                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
998                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
999                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1000                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1001                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1002                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1003                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1004                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1005                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1006                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1007                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1008                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1009                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1010                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1011                 </fields>
1012                 <links>
1013                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1014                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1015                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1016                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1017                 </links>
1018         </class>
1019
1020         <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">
1021                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1022                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1023                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1024                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1025                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1026                 </fields>
1027                 <links>
1028                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1029                 </links>
1030                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1031                         <actions>
1032                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1033                     <context link="event_def" field="owner"/>
1034                 </create>
1035                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1036                     <context link="event_def" field="owner"/>
1037                 </retrieve>
1038                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1039                     <context link="event_def" field="owner"/>
1040                 </update>
1041                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1042                     <context link="event_def" field="owner"/>
1043                 </delete>
1044                         </actions>
1045                 </permacrud>
1046         </class>
1047
1048         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1049                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1050                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1051                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1052                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1053                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1054                 </fields>
1055                 <links>
1056                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1057                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1058                 </links>
1059         </class>
1060
1061         <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">
1062                 <fields oils_persist:primary="code">
1063                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1064                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1065                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1066                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1067                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1068                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1069                 </fields>
1070                 <links/>
1071         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1072             <actions>
1073                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1074                 <retrieve/>
1075                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1076                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1077             </actions>
1078         </permacrud>
1079         </class>
1080
1081         <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">
1082                 <fields oils_persist:primary="code">
1083                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1084                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1085                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1086                 </fields>
1087                 <links/>
1088         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1089             <actions>
1090                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1091                 <retrieve/>
1092                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1093                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1094             </actions>
1095         </permacrud>
1096         </class>
1097
1098         <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">
1099                 <fields oils_persist:primary="code">
1100                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1101                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1102                 </fields>
1103                 <links/>
1104         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1105             <actions>
1106                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1107                 <retrieve/>
1108                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1109                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1110             </actions>
1111         </permacrud>
1112         </class>
1113
1114         <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">
1115                 <fields oils_persist:primary="code">
1116                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1117                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1118                 </fields>
1119                 <links/>
1120         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1121             <actions>
1122                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1123                 <retrieve/>
1124                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1125                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1126             </actions>
1127         </permacrud>
1128         </class>
1129
1130         <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">
1131                 <fields oils_persist:primary="code">
1132                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1133                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1134                 </fields>
1135                 <links/>
1136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1137             <actions>
1138                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1139                 <retrieve/>
1140                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1141                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1142             </actions>
1143         </permacrud>
1144         </class>
1145
1146         <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">
1147                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1148                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1149                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1150                 </fields>
1151                 <links/>
1152         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1153             <actions>
1154                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1155                 <retrieve/>
1156                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1157                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1158             </actions>
1159         </permacrud>
1160         </class>
1161
1162         <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">
1163                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1164                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1165                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1166                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1167                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1168                 </fields>
1169         <links>
1170             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1171             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1172             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1173         </links>
1174         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1175             <actions>
1176                 <create permission="UPDATE_COPY">
1177                     <context link="target_copy" field="circ_lib"/>
1178                 </create>
1179                 <retrieve/>
1180                 <update permission="UPDATE_COPY">
1181                     <context link="target_copy" field="circ_lib"/>
1182                 </update>
1183                 <delete permission="UPDATE_COPY">
1184                     <context link="target_copy" field="circ_lib"/>
1185                 </delete>
1186             </actions>
1187         </permacrud>
1188         </class>
1189
1190         <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">
1191                 <fields oils_persist:primary="code">
1192                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1193                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1194                 </fields>
1195                 <links/>
1196         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1197             <actions>
1198                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1199                 <retrieve/>
1200                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1201                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1202             </actions>
1203         </permacrud>
1204         </class>
1205
1206         <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">
1207                 <fields oils_persist:primary="code">
1208                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1209                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1210                 </fields>
1211                 <links/>
1212         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1213             <actions>
1214                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1215                 <retrieve/>
1216                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1217                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1218             </actions>
1219         </permacrud>
1220         </class>
1221
1222         <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">
1223                 <fields oils_persist:primary="code">
1224                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1225                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1226                 </fields>
1227                 <links/>
1228         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1229             <actions>
1230                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1231                 <retrieve/>
1232                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1233                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1234             </actions>
1235         </permacrud>
1236         </class>
1237
1238     <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">
1239         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1240             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1241             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1242             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1243             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1244             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1245             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1246             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1247             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1248             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1249             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1250             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1251             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1252             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1253             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1254             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1255         </fields>
1256         <links/>
1257         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1258             <actions>
1259                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1260                 <retrieve/>
1261                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1262                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1263             </actions>
1264         </permacrud>
1265     </class>
1266
1267     <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">
1268         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1269             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1270             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1271             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1272             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1273             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1274             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1275             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1276             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1277             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1278             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1279             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1280             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1281             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1282             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1283             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1284         </fields>
1285         <links/>
1286         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1287             <actions>
1288                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1289                 <retrieve/>
1290                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1291                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1292             </actions>
1293         </permacrud>
1294     </class>
1295
1296     <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">
1297         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1298             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1299             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1300             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1301             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1302             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1303         </fields>
1304         <links>
1305             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1306             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1307             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1308         </links>
1309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1310             <actions>
1311                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1312                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1313                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1314                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1315             </actions>
1316         </permacrud>
1317     </class>
1318
1319         <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">
1320                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1321                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1322                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1323                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1324                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1325                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1326                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1327                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1328                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1329                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1330                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1331                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1332                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1333                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1334                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1335                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1336                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1337             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1338                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1339                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1340                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1341                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1342                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1343                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1344                 </fields>
1345                 <links>
1346                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1347                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1348                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1349                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1350                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1351                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1352                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1353                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1354                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1355                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1356                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1357                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1358                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1359             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1360                 </links>
1361         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1362             <actions>
1363                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1364                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1365                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1366                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1367             </actions>
1368         </permacrud>
1369         </class>
1370
1371         <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">
1372                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1373                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1374                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1375                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1376                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1377                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1378                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1379                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1380                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1381                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1382                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1383                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1384                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1385                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1386                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1387             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1388                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1389                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1390             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1391                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1392                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1393                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1394                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1395             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1396             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1397             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1398                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1399                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1400                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1401                 </fields>
1402                 <links>
1403                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1404                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1405                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1406                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1407                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1408                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1409                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1410                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1411                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1412                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1413                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1414                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1415                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1416             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1417                 </links>
1418         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1419             <actions>
1420                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1421                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1422                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1423                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1424             </actions>
1425         </permacrud>
1426         </class>
1427
1428         <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">
1429                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1430                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1431                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1432                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1433                 </fields>
1434                 <links>
1435                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1436                 </links>
1437         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1438             <actions>
1439                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1440                     <context link="matchpoint" field="org_unit"/>
1441                 </create>
1442                 <retrieve/>
1443                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1444                     <context link="matchpoint" field="org_unit"/>
1445                 </update>
1446                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1447                     <context link="matchpoint" field="org_unit"/>
1448                 </delete>
1449             </actions>
1450         </permacrud>
1451         </class>
1452
1453         <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">
1454                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1455                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1456                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1457                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1458                 </fields>
1459                 <links>
1460                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1461                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1462                 </links>
1463         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1464             <actions>
1465                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1466                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1467                 </create>
1468                 <retrieve/>
1469                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1470                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1471                 </update>
1472                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1473                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1474                 </delete>
1475             </actions>
1476         </permacrud>
1477         </class>
1478
1479         <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">
1480                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1481                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1482                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1483                 </fields>
1484                 <links/>
1485         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1486             <actions>
1487                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1488                 <retrieve/>
1489                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1490                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1491             </actions>
1492         </permacrud>
1493         </class>
1494
1495         <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">
1496                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1497                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1498                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1499                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1500                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1501                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1502                 </fields>
1503                 <links>
1504                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1505                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1506                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1507                 </links>
1508         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1509             <actions>
1510                 <create permission="ADMIN_SURVEY">
1511                     <context link="survey" field="owner"/>
1512                 </create>
1513                 <retrieve/>
1514                 <update permission="ADMIN_SURVEY">
1515                     <context link="survey" field="owner"/>
1516                 </update>
1517                 <delete permission="ADMIN_SURVEY">
1518                     <context link="survey" field="owner"/>
1519                 </delete>
1520             </actions>
1521         </permacrud>
1522         </class>
1523         <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">
1524                 <fields oils_persist:primary="id" oils_persist:sequence="">
1525                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1526                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1527                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1528                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1529                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1530                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1531                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1532                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1533                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1534                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1535                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1536                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1537                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1538                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1539                 </fields>
1540                 <links>
1541                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1542                 </links>
1543         </class>
1544         <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">
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                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1561                 </fields>
1562                 <links>
1563                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1564                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1565                 </links>
1566         </class>
1567         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1568                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1569                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1570                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1571                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1572                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1573                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1574                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1575                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1576                 </fields>
1577                 <links>
1578                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1579                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1580                 </links>
1581         </class>
1582         <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">
1583                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1584                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1585                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1586                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1587                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1588                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1589                 </fields>
1590                 <links>
1591                         <link field="usr" reltype="has_a" key="id" class="au"/>
1592                 </links>
1593         </class>
1594         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1595                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1596                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1597                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1598                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1599                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1600                 </fields>
1601                 <links>
1602                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1603                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1604                 </links>
1605         </class>
1606         <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">
1607                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1608                         <field name="field" reporter:datatype="link"/>
1609                         <field name="id" reporter:datatype="id" />
1610                         <field name="source" reporter:datatype="link"/>
1611                         <field name="value" reporter:datatype="text"/>
1612                 </fields>
1613                 <links>
1614                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1615                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1616                 </links>
1617         </class>
1618         <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">
1619                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1620                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1621                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1622                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1623                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1624                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1625                 </fields>
1626                 <links>
1627                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1628                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1629                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1630                 </links>
1631         </class>
1632         <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">
1633                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1634                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1635                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1636                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1637                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1638                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1639                 </fields>
1640                 <links>
1641                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1642                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1643                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1644                 </links>
1645         </class>
1646         <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">
1647                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1648                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1649                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1650                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1651                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1652                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1653                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1654                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1655                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1656                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1657                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1658                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1659                 </fields>
1660                 <links>
1661                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1662                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1663                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1664                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1665                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1666                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1667                 </links>
1668         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1669             <actions>
1670                 <create permission="TRANSIT_COPY" context_field="owner">
1671                     <context link="target_copy" field="circ_lib"/>
1672                 </create>
1673                 <retrieve/>
1674                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1675                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1676             </actions>
1677         </permacrud>
1678         </class>
1679         <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">
1680                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1681                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1682                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1683                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1684                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1685                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1686                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1687                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1688                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1689                 </fields>
1690                 <links>
1691                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1692                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1693                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1694                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1695                 </links>
1696         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1697             <actions>
1698                 <create permission="ADMIN_SURVEY">
1699                     <context link="survey" field="owner"/>
1700                 </create>
1701                 <retrieve/>
1702                 <update permission="ADMIN_SURVEY">
1703                     <context link="survey" field="owner"/>
1704                 </update>
1705                 <delete permission="ADMIN_SURVEY">
1706                     <context link="survey" field="owner"/>
1707                 </delete>
1708             </actions>
1709         </permacrud>
1710         </class>
1711         <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">
1712                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1713                         <field name="bucket" />
1714                         <field name="id" reporter:datatype="id" />
1715                         <field name="target_copy" reporter:datatype="link"/>
1716                         <field name="create_time" reporter:datatype="timestamp" />
1717                         <field name="pos" reporter:datatype="int" />
1718                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1719                 </fields>
1720                 <links>
1721                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1722                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1723             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1724                 </links>
1725         </class>
1726         <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">
1727                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1728                         <field name="id" reporter:datatype="id" />
1729                         <field name="item" reporter:datatype="link"/>
1730                         <field name="note" reporter:datatype="text" />
1731                 </fields>
1732                 <links>
1733                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1734                 </links>
1735         </class>
1736         <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">
1737                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1738                         <field name="active" reporter:datatype="bool"/>
1739                         <field name="create_date" reporter:datatype="timestamp"/>
1740                         <field name="creator" />
1741                         <field name="deleted" reporter:datatype="bool"/>
1742                         <field name="edit_date" reporter:datatype="timestamp"/>
1743                         <field name="editor" />
1744                         <field name="id" reporter:datatype="id" />
1745                         <field name="last_xact_id" />
1746                         <field name="marc" />
1747                         <field name="source" />
1748                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1749                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1750                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1751                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
1752                 </fields>
1753                 <links>
1754                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1755                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1756                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1757                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1758                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
1759                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1760                 </links>
1761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1762                         <actions>
1763                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1764                                 <retrieve/>
1765                                 <update permission="UPDATE_MARC" global_required="true"/>
1766                                 <delete permission="UPDATE_MARC" global_required="true"/>
1767                         </actions>
1768                 </permacrud>
1769         </class>
1770         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1771                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1772                         <field name="char_encoding" />
1773                         <field name="id" />
1774                         <field name="record" />
1775                         <field name="record_status" />
1776                 </fields>
1777                 <links>
1778                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1779                 </links>
1780         </class>
1781         <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">
1782                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
1783                         <field name="id" reporter:datatype="id" />
1784                         <field name="bib" reporter:datatype="link" />
1785                         <field name="authority" reporter:datatype="link" />
1786                 </fields>
1787                 <links>
1788                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
1789                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
1790                 </links>
1791         </class>
1792         <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">
1793                 <fields oils_persist:primary="code" oils_persist:sequence="">
1794                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1795                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1796                 </fields>
1797                 <links/>
1798         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1799             <actions>
1800                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1801                 <retrieve/>
1802                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1803                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1804             </actions>
1805         </permacrud>
1806         </class>
1807         <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">
1808                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1809                         <field name="accepting_usr" />
1810                         <field name="amount" reporter:datatype="money" />
1811                         <field name="amount_collected" reporter:datatype="money" />
1812                         <field name="approval_code" reporter:datatype="text"/>
1813                         <field name="cash_drawer" reporter:datatype="link"/>
1814                         <field name="cc_first_name" reporter:datatype="text"/>
1815                         <field name="cc_last_name" reporter:datatype="text"/>
1816                         <field name="cc_number" reporter:datatype="text"/>
1817                         <field name="cc_order_number" reporter:datatype="text"/>
1818                         <field name="cc_type" reporter:datatype="text"/>
1819                         <field name="cc_processor" reporter:datatype="text"/>
1820                         <field name="expire_month" reporter:datatype="int" />
1821                         <field name="expire_year" reporter:datatype="int" />
1822                         <field name="id" reporter:datatype="id" />
1823                         <field name="note" reporter:datatype="text"/>
1824                         <field name="payment_ts" reporter:datatype="timestamp"/>
1825                         <field name="xact" reporter:datatype="link"/>
1826                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1827                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1828                 </fields>
1829                 <links>
1830                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1831                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1832                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1833                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1834                 </links>
1835         </class>
1836         <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">
1837                 <fields oils_persist:primary="name">
1838                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1839                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1840                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1841                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1842                 </fields>
1843                 <links/>
1844         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1845             <actions>
1846                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1847                 <retrieve/>
1848                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1849                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1850             </actions>
1851         </permacrud>
1852         </class>
1853
1854         <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">
1855                 <fields oils_persist:primary="alias">
1856                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
1857                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1858                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
1859                 </fields>
1860                 <links>
1861                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1862                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1863                 </links>
1864         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1865             <actions>
1866                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1867                 <retrieve/>
1868                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1869                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
1870             </actions>
1871         </permacrud>
1872         </class>
1873
1874         <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">
1875                 <fields oils_persist:primary="name">
1876                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1877                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1878                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1879                 </fields>
1880                 <links>
1881                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
1882                 </links>
1883         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1884             <actions>
1885                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
1886                 <retrieve/>
1887                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
1888                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
1889             </actions>
1890         </permacrud>
1891         </class>
1892
1893         <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">
1894                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1895                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1896                         <field reporter:label="ID" name="id" reporter:datatype="id" />
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="XPath" name="xpath" reporter:datatype="text"/>
1900                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
1901                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1902                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
1903                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
1904                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
1905                 </fields>
1906                 <links>
1907                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1908                 </links>
1909         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1910             <actions>
1911                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1912                 <retrieve/>
1913                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1914                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1915             </actions>
1916         </permacrud>
1917         </class>
1918         <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">
1919                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
1920                         <field name="id" reporter:datatype="id" />
1921                         <field name="name" reporter:datatype="text"/>
1922                         <field name="xpath" reporter:datatype="text"/>
1923                         <field name="format" reporter:datatype="link"/>
1924                         <field name="first_word" reporter:datatype="bool" />
1925                 </fields>
1926                 <links/>
1927         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1928             <actions>
1929                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
1930                 <retrieve/>
1931                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
1932                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
1933             </actions>
1934         </permacrud>
1935         </class>
1936         <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">
1937                 <fields oils_persist:primary="code" oils_persist:sequence="">
1938                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1939                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1940                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1941                 </fields>
1942                 <links/>
1943         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1944             <actions>
1945                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1946                 <retrieve/>
1947                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1948                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1949             </actions>
1950         </permacrud>
1951         </class>
1952         <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">
1953                 <fields oils_persist:primary="code" oils_persist:sequence="">
1954                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1955                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1956                 </fields>
1957                 <links/>
1958         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1959             <actions>
1960                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1961                 <retrieve/>
1962                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1963                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1964             </actions>
1965         </permacrud>
1966         </class>
1967     <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">
1968         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
1969             <field reporter:label="Call number class ID" name="id" reporter_datatype="id"/>
1970             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1971             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
1972             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
1973         </fields>
1974         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1975             <actions>
1976                 <retrieve/>
1977             </actions>
1978         </permacrud>
1979     </class>
1980         <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">
1981                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
1982                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1983                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1984                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
1985                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1986                 </fields>
1987                 <links>
1988                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1989                 </links>
1990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1991             <actions>
1992                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
1993                 <retrieve/>
1994                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
1995                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
1996             </actions>
1997         </permacrud>
1998         </class>
1999         <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">
2000                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2001                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2002                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2003                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2004                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2005                 </fields>
2006                 <links>
2007                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2008                 </links>
2009         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2010             <actions>
2011                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2012                 <retrieve/>
2013                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2014                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2015             </actions>
2016         </permacrud>
2017         </class>
2018         <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">
2019                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2020                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2021                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2022                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2023                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2024                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2025                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2026                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2027                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2028                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2029                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2030                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2031                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2032                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2033                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
2034                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2035                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2036                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2037                 </fields>
2038                 <links>
2039                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2040                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2041                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2042                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2043                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2044                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2045                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2046                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2047                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2048                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2049                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2050                 </links>
2051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2052             <actions>
2053                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2054                 <retrieve/>
2055                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2056                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2057             </actions>
2058         </permacrud>
2059         </class>
2060         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2061                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2062                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2063                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2064                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2065                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2066                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2067                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2068                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2069                 </fields>
2070                 <links>
2071                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2072                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2073         </links>
2074         </class>
2075         <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">
2076                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2077                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2078                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2079                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2080                 </fields>
2081                 <links>
2082                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2083                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2084                 </links>
2085         </class>
2086         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2087                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2088                         <field name="id" reporter:datatype="id" />
2089                         <field name="value" oils_persist:i18n="true" />
2090                 </fields>
2091                 <links/>
2092         </class>
2093         <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">
2094                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2095                         <field name="balance_owed" reporter:datatype="money" />
2096                         <field name="total_owed" reporter:datatype="money" />
2097                         <field name="total_paid" reporter:datatype="money" />
2098                         <field name="usr" reporter:datatype="link"/>
2099                 </fields>
2100                 <links>
2101                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2102         </links>
2103         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2104             <actions>
2105                 <retrieve permission="VIEW_USER">
2106                     <context link="usr" field="home_ou"/>
2107                 </retrieve>
2108             </actions>
2109         </permacrud>
2110         </class>
2111         <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">
2112                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2113                         <field name="collector" />
2114                         <field name="enter_time" reporter:datatype="timestamp"/>
2115                         <field name="id" reporter:datatype="id" />
2116                         <field name="location" reporter:datatype="link"/>
2117                         <field name="usr" reporter:datatype="link"/>
2118                 </fields>
2119                 <links>
2120                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2121                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2122                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2123                 </links>
2124         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2125             <actions>
2126                 <create permission="money.collections_tracker.create" context_field="location"/>
2127                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2128                 <delete permission="money.collections_tracker.create" context_field="location"/>
2129             </actions>
2130         </permacrud>
2131         </class>
2132         <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">
2133                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2134                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2135                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2136                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2137                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2138                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2139                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2140                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2141                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2142                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2143                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2144                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2145                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2146                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2147                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2148                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2149                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2150                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2151                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2152                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2153                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2154                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2155                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2156                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2157                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2158                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2159                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2160                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2161                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2162                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2163                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2164                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2165                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2166                 </fields>
2167                 <links>
2168                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2169                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2170                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2171                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2172                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2173                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2174                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2175                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2176                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2177                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2178                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2179                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2180                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2181                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2182                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2183                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2184                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2185                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2186                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2187                 </links>
2188         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2189             <actions>
2190                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2191                 <retrieve/>
2192                 <update permission="UPDATE_MARC" global_required="true"/>
2193             </actions>
2194         </permacrud>
2195         </class>
2196         <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">
2197                 <fields oils_persist:primary="id">
2198                         <field name="dow_0_close" />
2199                         <field name="dow_0_open" />
2200                         <field name="dow_1_close" />
2201                         <field name="dow_1_open" />
2202                         <field name="dow_2_close" />
2203                         <field name="dow_2_open" />
2204                         <field name="dow_3_close" />
2205                         <field name="dow_3_open" />
2206                         <field name="dow_4_close" />
2207                         <field name="dow_4_open" />
2208                         <field name="dow_5_close" />
2209                         <field name="dow_5_open" />
2210                         <field name="dow_6_close" />
2211                         <field name="dow_6_open" />
2212                         <field name="id" reporter:datatype="id" />
2213                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2214                 </fields>
2215                 <links>
2216                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2217                 </links>
2218         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2219             <actions>
2220                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2221                 <retrieve/>
2222                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2223                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2224             </actions>
2225         </permacrud>
2226         </class>
2227         <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">
2228                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2229                         <field name="id" reporter:datatype="id" />
2230                         <field name="record" reporter:datatype="link"/>
2231                         <field name="label" reporter:datatype="text"/>
2232                         <field name="label_sortkey" reporter:datatype="text"/>
2233                 </fields>
2234                 <links>
2235                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2236                 </links>
2237         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2238             <actions>
2239                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2240                 <retrieve/>
2241                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2242                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2243             </actions>
2244         </permacrud>
2245         </class>
2246         <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">
2247                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2248                         <field name="id" reporter:datatype="id" />
2249                         <field name="target_copy" reporter:datatype="link" />
2250                         <field name="part" reporter:datatype="link"/>
2251                 </fields>
2252                 <links>
2253                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2254                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2255                 </links>
2256         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2257             <actions>
2258                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2259                 <retrieve/>
2260                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2261                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2262             </actions>
2263         </permacrud>
2264         </class>
2265         <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">
2266                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2267                         <field name="close_end" reporter:datatype="timestamp" />
2268                         <field name="close_start" reporter:datatype="timestamp" />
2269                         <field name="id" reporter:datatype="id" />
2270                         <field name="org_unit" reporter:datatype="org_unit"/>
2271                         <field name="reason" reporter:datatype="text"/>
2272                 </fields>
2273                 <links>
2274                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2275                 </links>
2276         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2277             <actions>
2278                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2279                 <retrieve/>
2280                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2281                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2282             </actions>
2283         </permacrud>
2284         </class>
2285         <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">
2286                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2287                         <field name="extended" reporter:datatype="interval"/>
2288                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2289                         <field name="max_renewals" reporter:datatype="int" />
2290                         <field name="name" reporter:datatype="text"/>
2291                         <field name="normal" reporter:datatype="interval"/>
2292                         <field name="shrt" reporter:datatype="interval"/>
2293                 </fields>
2294                 <links>
2295                 </links>
2296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2297             <actions>
2298                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2299                 <retrieve/>
2300                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2301                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2302             </actions>
2303         </permacrud>
2304         </class>
2305
2306         <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">
2307                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2308                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2309                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2310             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2311                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2312             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2313                 </fields>
2314                 <links>
2315             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
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="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">
2328                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2329                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2330                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2331                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2332             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2333                 </fields>
2334                 <links>
2335                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2336                 </links>
2337                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2338             <actions>
2339                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2340                 <retrieve/>
2341                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2342                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2343             </actions>
2344                 </permacrud>
2345         </class>
2346
2347         <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">
2348                 <fields oils_persist:primary="id" oils_persist:sequence="">
2349                         <field name="balance_owed" reporter:datatype="money"/>
2350                         <field name="id" reporter:datatype="id" />
2351                         <field name="last_billing_note" reporter:datatype="text"/>
2352                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2353                         <field name="last_billing_type" reporter:datatype="text"/>
2354                         <field name="last_payment_note" reporter:datatype="text"/>
2355                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2356                         <field name="last_payment_type" reporter:datatype="text"/>
2357                         <field name="total_owed" reporter:datatype="money"/>
2358                         <field name="total_paid" reporter:datatype="money"/>
2359                         <field name="usr" reporter:datatype="link"/>
2360                         <field name="xact_finish" reporter:datatype="timestamp" />
2361                         <field name="xact_start" reporter:datatype="timestamp" />
2362                         <field name="xact_type" reporter:datatype="text"/>
2363                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2364                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2365                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2366                         <field name="billing_location" reporter:datatype="link"/>
2367                 </fields>
2368                 <links>
2369                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2370                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2371                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2372                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2373                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2374                 </links>
2375         </class>
2376         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2377                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2378                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2379                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2380                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2381                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2382                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2383                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2384                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2385                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2386                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2387                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2388                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2389                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2390                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2391                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2392                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2393                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2394                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2395                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2396                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2397                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2398                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2399                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2400                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2401                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2402                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2403                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2404                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2405                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2406                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2407                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2408                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2409                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2410                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2411                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2412                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2413                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2414                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2415                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2416                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2417                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2418                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2419                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2420                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2421                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2422                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2423                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2424                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2425                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2426                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2427                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2428                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2429                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2430                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2431                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2432                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2433                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2434                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2435                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2436                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2437                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2438                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2439                 </fields>
2440                 <links>
2441                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2442                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2443                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2444                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2445                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2446                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2447                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2448                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2449                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2450                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2451                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2452                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2453                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2454                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2455                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2456                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2457                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2458                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2459                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2460                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2461                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2462                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2463                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2464                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2465                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2466                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2467                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2468                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2469                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2470                 </links>
2471         </class>
2472
2473         <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">
2474                 <fields oils_persist:primary="name">
2475                         <field name="name" reporter:datatype="text"/>
2476                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2477                 </fields>
2478                 <links/>
2479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2480                         <actions>
2481                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2482                                 <retrieve/>
2483                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2484                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2485                         </actions>
2486                 </permacrud>
2487         </class>
2488         <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">
2489                 <fields oils_persist:primary="name">
2490                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2491                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2492                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2493                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2494                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2495                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2496                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2497                 </fields>
2498                 <links>
2499                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2500                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2501                 </links>
2502                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2503                         <actions>
2504                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2505                                 <retrieve/>
2506                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2507                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2508                         </actions>
2509                 </permacrud>
2510         </class>
2511         <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">
2512                 <fields oils_persist:primary="name">
2513                         <field name="name" reporter:datatype="text"/>
2514                         <field name="label" reporter:datatype="text"/>
2515                         <field name="description" reporter:datatype="text"/>
2516                         <field name="datatype" reporter:datatype="text"/>
2517                         <field name="view_perm" reporter:datatype="link"/>
2518                         <field name="update_perm" reporter:datatype="link"/>
2519                         <field name="fm_class" reporter:datatype="text"/>
2520                         <field name="grp" reporter:datatype="link"/>
2521                 </fields>
2522                 <links>
2523                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2524                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2525                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2526                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2527                 </links>
2528                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2529                         <actions>
2530                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2531                                 <retrieve/>
2532                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2533                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2534                         </actions>
2535                 </permacrud>
2536         </class>
2537         <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">
2538                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2539                         <field name="id" />
2540                         <field name="name"  reporter:datatype="text"/>
2541                         <field name="org_unit" reporter:datatype="org_unit"/>
2542                         <field name="value"  reporter:datatype="text"/>
2543                 </fields>
2544                 <links>
2545                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2546                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2547                 </links>
2548         </class>
2549         <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">
2550                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2551                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2552                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2553                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2554                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2555                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2556                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2557                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2558                 </fields>
2559                 <links>
2560                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2561                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2562                 </links>
2563         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2564             <actions>
2565                 <create permission="CREATE_COPY_NOTE">
2566                     <context link="owning_copy" field="circ_lib"/>
2567                 </create>
2568                 <retrieve permission="VIEW_COPY_NOTES">
2569                     <context link="owning_copy" field="circ_lib"/>
2570                 </retrieve>
2571                 <update permission="UPDATE_COPY_NOTE">
2572                     <context link="owning_copy" field="circ_lib"/>
2573                 </update>
2574                 <delete permission="DELETE_COPY_NOTE">
2575                     <context link="owning_copy" field="circ_lib"/>
2576                 </delete>
2577             </actions>
2578         </permacrud>
2579         </class>
2580         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2581                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2582                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2583                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2584                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2585                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2586                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2587                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2588                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2589                 </fields>
2590                 <links>
2591                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2592                 </links>
2593         </class>
2594         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2595                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2596                         <field name="fingerprint"  reporter:datatype="text"/>
2597                         <field name="id" reporter:datatype="id" />
2598                         <field name="master_record" reporter:datatype="link"/>
2599                         <field name="mods"  reporter:datatype="text"/>
2600                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2601                 </fields>
2602                 <links>
2603                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2604                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2605                 </links>
2606         </class>
2607         <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">
2608                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2609                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2610                         <field name="name"  reporter:datatype="text"/>
2611                 </fields>
2612                 <links/>
2613         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2614             <actions>
2615                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2616                 <retrieve/>
2617                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2618                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2619             </actions>
2620         </permacrud>
2621         </class>
2622         <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">
2623                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2624                         <field name="code"  reporter:datatype="text"/>
2625                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2626                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2627                 </fields>
2628                 <links/>
2629         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2630             <actions>
2631                 <create permission="CREATE_PERM" global_required="true"/>
2632                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2633                 <update permission="UPDATE_PERM" global_required="true"/>
2634                 <delete permission="DELETE_PERM" global_required="true"/>
2635             </actions>
2636         </permacrud>
2637         </class>
2638         <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">
2639                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2640                         <field name="id" reporter:datatype="id" />
2641                         <field name="metarecord" reporter:datatype="link"/>
2642                         <field name="source" reporter:datatype="link"/>
2643                 </fields>
2644                 <links>
2645                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2646                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2647                 </links>
2648         </class>
2649         <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">
2650                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2651                         <field name="id" reporter:datatype="id" />
2652                         <field name="field" reporter:datatype="link"/>
2653                         <field name="source" reporter:datatype="link"/>
2654                         <field name="value"  reporter:datatype="text"/>
2655                 </fields>
2656                 <links>
2657                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2658                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2659                 </links>
2660         </class>
2661         <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">
2662                 <oils_persist:source_definition>
2663                         SELECT * FROM metabib.author_field_entry
2664                                                 UNION ALL
2665                         SELECT * FROM metabib.keyword_field_entry
2666                                                 UNION ALL
2667                         SELECT * FROM metabib.identifier_field_entry
2668                                                 UNION ALL
2669                         SELECT * FROM metabib.title_field_entry
2670                                                 UNION ALL
2671                         SELECT * FROM metabib.subject_field_entry
2672                                                 UNION ALL
2673                         SELECT * FROM metabib.series_field_entry
2674                 </oils_persist:source_definition>
2675                 <fields>
2676                         <field name="field" reporter:datatype="link"/>
2677                         <field name="id" reporter:datatype="id" />
2678                         <field name="source" reporter:datatype="link"/>
2679                         <field name="value"  reporter:datatype="text"/>
2680                 </fields>
2681                 <links>
2682                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2683                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2684                 </links>
2685         </class>
2686         <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">
2687                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2688                         <field name="field" reporter:datatype="link"/>
2689                         <field name="id" reporter:datatype="id" />
2690                         <field name="source" reporter:datatype="link"/>
2691                         <field name="value"  reporter:datatype="text"/>
2692                 </fields>
2693                 <links>
2694                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2695                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2696                 </links>
2697         </class>
2698         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2699                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2700                         <field name="accepting_usr" reporter:datatype="link"/>
2701                         <field name="amount" reporter:datatype="money" />
2702                         <field name="amount_collected" reporter:datatype="money" />
2703                         <field name="cash_drawer" reporter:datatype="link"/>
2704                         <field name="id" reporter:datatype="id" />
2705                         <field name="note"  reporter:datatype="text"/>
2706                         <field name="payment_ts" reporter:datatype="timestamp"/>
2707                         <field name="xact" reporter:datatype="link"/>
2708                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2709                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2710                 </fields>
2711                 <links>
2712                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2713                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2714                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2715                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2716                 </links>
2717         </class>
2718         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2719                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2720                         <field name="accepting_usr" reporter:datatype="link"/>
2721                         <field name="amount" reporter:datatype="money" />
2722                         <field name="amount_collected" reporter:datatype="money" />
2723                         <field name="id" reporter:datatype="id" />
2724                         <field name="note"  reporter:datatype="text"/>
2725                         <field name="payment_ts" reporter:datatype="timestamp"/>
2726                         <field name="xact" reporter:datatype="link"/>
2727                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2728                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2729                 </fields>
2730                 <links>
2731                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2732                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2733                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2734                 </links>
2735         </class>
2736         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2737                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2738                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2739                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2740                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2741                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2742                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2743                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2744                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2745                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2746                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2747                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2748                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2749                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2750                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2751                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2752                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2753                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2754                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2755                 </fields>
2756                 <links>
2757                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2758                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2759                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2760                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2761                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2762                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2763                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2764                 </links>
2765         </class>
2766
2767         <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">
2768                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2769                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2770                         <field name="name"  reporter:datatype="text"/>
2771                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2772                         <field name="block_list" reporter:datatype="text"/>
2773                         <field name="org_depth" reporter:datatype="int"/>
2774                 </fields>
2775                 <links/>
2776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2777             <actions>
2778                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2779                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2780                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2781                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2782             </actions>
2783         </permacrud>
2784         </class>
2785         <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">
2786                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2787                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2788                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2789                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2790                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2791                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2792                 </fields>
2793                 <links>
2794                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2795                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2796                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2797         </links>
2798         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2799             <actions>
2800                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2801                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2802                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2803                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2804             </actions>
2805         </permacrud>
2806         </class>
2807         <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">
2808                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2809                         <field name="holdable" reporter:datatype="bool"/>
2810                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2811                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2812                         <field name="opac_visible" reporter:datatype="bool"/>
2813             <field name="copy_active" reporter:datatype="bool"/>
2814                 </fields>
2815                 <links/>
2816         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2817             <actions>
2818                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2819                 <retrieve/>
2820                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2821                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2822             </actions>
2823         </permacrud>
2824         </class>
2825         <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">
2826                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2827                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2828                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2829                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2830                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2831                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2832                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2833                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2834                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2835                 </fields>
2836                 <links>
2837                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2838                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2839                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2840                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2841                 </links>
2842                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2843                         <actions>
2844                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2845                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2846                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2847                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2848                         </actions>
2849                 </permacrud>
2850         </class>
2851         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2852                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2853                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2854                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2855                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2856                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2857                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2858                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2859                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2860                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2861                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2862                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2863                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2864                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2865                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2866                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2867                 </fields>
2868                 <links>
2869                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2870                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2871                 </links>
2872         </class>
2873
2874         <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">
2875                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
2876                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2877                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
2878                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2879                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2880                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
2881                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
2882                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
2883                 </fields>
2884                 <links>
2885                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2886                 </links>
2887         </class>
2888
2889         <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">
2890                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2891                         <field name="call_number" />
2892                         <field name="create_date" reporter:datatype="timestamp"/>
2893                         <field name="creator" reporter:datatype="link"/>
2894                         <field name="id" reporter:datatype="id" />
2895                         <field name="pub" reporter:datatype="bool"/>
2896                         <field name="title"  reporter:datatype="text"/>
2897                         <field name="value"  reporter:datatype="text"/>
2898                 </fields>
2899                 <links>
2900                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2901                 </links>
2902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2903             <actions>
2904                 <create permission="CREATE_VOLUME_NOTE">
2905                     <context link="call_number" field="owning_lib"/>
2906                 </create>
2907                 <retrieve permission="VIEW_VOLUME_NOTES">
2908                     <context link="call_number" field="owning_lib"/>
2909                 </retrieve>
2910                 <update permission="UPDATE_VOLUME_NOTE">
2911                     <context link="call_number" field="owning_lib"/>
2912                 </update>
2913                 <delete permission="DELETE_VOLUME_NOTE">
2914                     <context link="call_number" field="owning_lib"/>
2915                 </delete>
2916             </actions>
2917         </permacrud>
2918         </class>
2919         <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">
2920                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2921                         <field name="create_date" reporter:datatype="timestamp"/>
2922                         <field name="creator" reporter:datatype="link"/>
2923                         <field name="edit_date" reporter:datatype="timestamp"/>
2924                         <field name="editor" reporter:datatype="link"/>
2925                         <field name="id" reporter:datatype="id" />
2926                         <field name="record" reporter:datatype="link"/>
2927                         <field name="value" reporter:datatype="text"/>
2928                 </fields>
2929                 <links>
2930                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2931                 </links>
2932         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2933             <actions>
2934                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2935                 <retrieve/>
2936                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2937                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2938             </actions>
2939         </permacrud>
2940         </class>
2941         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
2942         <oils_persist:source_definition>
2943 SELECT  usr,
2944         SUM(
2945             CASE
2946                 WHEN (
2947                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
2948                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2949                 ) THEN 1
2950                 ELSE 0
2951             END
2952         ) AS out,
2953
2954         SUM(
2955             CASE
2956                 WHEN (
2957                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
2958                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2959                 ) THEN 1
2960                 ELSE 0
2961             END
2962         ) AS overdue,
2963
2964         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
2965         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
2966         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
2967   FROM  action.circulation
2968   WHERE checkin_time IS NULL
2969   GROUP BY 1
2970         </oils_persist:source_definition>
2971         <fields oils_persist:primary="usr">
2972             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
2973             <field reporter:label="Out" name="out" reporter:datatype="text"/>
2974             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
2975             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
2976             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
2977             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
2978         </fields>
2979         <links>
2980             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2981         </links>
2982         </class>
2983         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
2984         <oils_persist:source_definition>
2985 SELECT  usr,
2986         ARRAY_TO_STRING(ARRAY_ACCUM(
2987             CASE
2988                 WHEN (
2989                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
2990                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2991                 ) THEN id
2992                 ELSE 0
2993             END
2994         ),',') AS out,
2995
2996         ARRAY_TO_STRING(ARRAY_ACCUM(
2997             CASE
2998                 WHEN (
2999                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3000                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3001                 ) THEN id
3002                 ELSE 0
3003             END
3004         ),',') AS overdue,
3005
3006         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3007         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3008         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3009   FROM  action.circulation
3010   WHERE checkin_time IS NULL
3011   GROUP BY 1
3012         </oils_persist:source_definition>
3013         <fields oils_persist:primary="usr">
3014             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3015             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3016             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3017             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3018             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3019             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3020         </fields>
3021         <links>
3022             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3023         </links>
3024         </class>
3025         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3026                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3027                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3028                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3029                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3030                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3031                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3032                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3033                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3034                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3035                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3036                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3037                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3038                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3039                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3040                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3041                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3042                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3043                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3044                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3045                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3046                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3047                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3048                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3049                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3050                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3051                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3052                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3053                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3054                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3055                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3056                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3057                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3058                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3059                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3060                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3061                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3062                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3063                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3064                 </fields>
3065                 <links>
3066                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3067                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3068                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3069                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3070                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3071                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3072                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3073                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3074                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3075                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3076                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3077                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3078                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3079                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3080                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3081                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3082                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3083                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3084                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3085                 </links>
3086         </class>
3087         <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">
3088                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3089                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3090                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3091                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3092                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3093                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3094                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3095                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3096                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3097                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3098                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3099                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3100                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3101                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3102                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3103                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3104                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3105                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3106                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3107                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3108                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3109                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3110                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3111                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3112                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3113                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3114                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3115                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3116                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3117                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3118                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3119                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3120                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3121                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3122                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3123                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3124                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3125                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3126                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3127                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3128                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3129                 </fields>
3130                 <links>
3131                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3132                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3133                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3134                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3135                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3136                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3137                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3138                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3139                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3140                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3141                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3142                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3143                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3144                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3145                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3146                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3147                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3148                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3149                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3150                 </links>
3151         </class>
3152         <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">
3153                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3154                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3155                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3156                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3157                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3158                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3159                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3160                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3161                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3162                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3163                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3164                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3165                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3166                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3167                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3168                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3169                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3170                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3171                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3172                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3173                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3174                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3175                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3176                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3177                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3178                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3179                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3180                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3181                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3182                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3183                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3184                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3185                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3186                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3187                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3188                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3189                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3190                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3191                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3192                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3193                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3194                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3195                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3196                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3197                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3198                 </fields>
3199                 <links>
3200                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3201                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3202                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3203                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3204                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3205                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3206                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3207                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3208                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3209                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3210                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3211                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3212                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3213                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3214                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3215                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3216                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3217                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3218                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3219                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3220                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3221                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3222                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3223                 </links>
3224         </class>
3225
3226         <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">
3227                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3228                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3229                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3230                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3231                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3232                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3233                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3234                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3235                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3236                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3237                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3238                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3239                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3240                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3241                 </fields>
3242                 <links>
3243                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3244                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3245                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3246                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3247                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3248                 </links>
3249                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3250                         <actions>
3251                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3252                                 <retrieve />
3253                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3254                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3255                         </actions>
3256                 </permacrud>
3257         </class>
3258
3259         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3260                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3261                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3262                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3263                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3264                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3265                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3266                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3267                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3268                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3269                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3270                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3271                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3272                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3273                 </fields>
3274                 <links>
3275                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3276                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3277                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3278                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3279                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3280                 </links>
3281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3282                         <actions>
3283                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3284                                 <retrieve />
3285                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3286                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3287                         </actions>
3288                 </permacrud>
3289         </class>
3290         
3291         <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">
3292                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3293                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3294                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3295                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3296                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3297                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3298                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3299                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3300                 </fields>
3301                 <links>
3302                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3303                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3304                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3305                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3306                 </links>
3307                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3308                         <actions>
3309                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3310                                 <retrieve />
3311                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3312                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3313                         </actions>
3314                 </permacrud>
3315         </class>
3316         
3317         <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">
3318                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3319                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3320                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3321                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3322                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3323                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3324                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3325                 </fields>
3326                 <links>
3327                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3328                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3329                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3330                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3331                 </links>
3332                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3333                         <actions>
3334                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3335                                 <retrieve />
3336                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3337                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3338                         </actions>
3339                 </permacrud>
3340         </class>
3341         
3342         <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">
3343                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3344                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3345                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3346                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3347                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3348                 </fields>
3349                 <links>
3350                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3351                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3352                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3353                 </links>
3354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3355                         <actions>
3356                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3357                                 <retrieve />
3358                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3359                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3360                         </actions>
3361                 </permacrud>
3362         </class>
3363         
3364         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3365                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3366                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3367                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3368                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3369                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3370                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3371                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3372                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3373                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3374                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3375                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3376                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3377                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3378                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3379                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3380                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3381                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3382                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3383                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3384                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3385                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3386                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3387                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3388                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3389                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3390                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3391                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3392                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3393                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3394                 </fields>
3395                 <links>
3396                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3397                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3398                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3399                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3400                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3401                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3402                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3403                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3404                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3405                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3406                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3407                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3408                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3409                 </links>
3410                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3411                         <actions>
3412                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3413                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3414                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3415                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3416                         </actions>
3417                 </permacrud>
3418         </class>
3419         
3420         <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">
3421                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3422                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3423                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3424                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3425                 </fields>
3426                 <links>
3427                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3428                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3429                 </links>
3430                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3431                         <actions>
3432                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3433                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3434                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3435                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3436                         </actions>
3437                 </permacrud>
3438         </class>
3439
3440         <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">
3441                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3442                         <field name="bucket" reporter:datatype="link"/>
3443                         <field name="id" reporter:datatype="id" />
3444                         <field name="target_call_number" reporter:datatype="link" />
3445                         <field name="create_time" reporter:datatype="timestamp" />
3446                         <field name="pos" reporter:datatype="int" />
3447                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3448                 </fields>
3449                 <links>
3450                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3451                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3452             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3453                 </links>
3454         </class>
3455         <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">
3456                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3457                         <field name="id" reporter:datatype="id" />
3458                         <field name="item" reporter:datatype="link"/>
3459                         <field name="note" reporter:datatype="text" />
3460                 </fields>
3461                 <links>
3462                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3463                 </links>
3464         </class>
3465         <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">
3466                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3467                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3468                         <field name="btype" reporter:datatype="text"/>
3469                         <field name="id" reporter:datatype="id" />
3470                         <field name="name" reporter:datatype="text"/>
3471                         <field name="owner" reporter:datatype="link"/>
3472                         <field name="pub" reporter:datatype="bool"/>
3473                         <field name="create_time" reporter:datatype="timestamp" />
3474                 </fields>
3475                 <links>
3476                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3477                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3478                 </links>
3479         </class>
3480         <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">
3481                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3482                         <field name="id" reporter:datatype="id" />
3483                         <field name="bucket" reporter:datatype="link"/>
3484                         <field name="note" reporter:datatype="text" />
3485                 </fields>
3486                 <links>
3487                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3488                 </links>
3489         </class>
3490         <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">
3491                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3492                         <field name="hold" reporter:datatype="link"/>
3493                         <field name="id" reporter:datatype="id" />
3494                         <field name="target_copy" reporter:datatype="link"/>
3495                 </fields>
3496                 <links>
3497                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3498                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3499                 </links>
3500         </class>
3501         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3502                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3503                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3504                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3505                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3506                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3507                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3508                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3509                 </fields>
3510                 <links>
3511                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3512                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3513                 </links>
3514         </class>
3515         <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">
3516                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3517                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3518                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3519                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3520                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3521                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3522                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3523                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3524                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3525                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3526                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3527                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3528                 </fields>
3529                 <links>
3530                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3531                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3532                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3533                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3534                 </links>
3535         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3536             <actions>
3537                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3538                 <retrieve/>
3539                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3540                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3541             </actions>
3542         </permacrud>
3543         </class>
3544
3545     <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">
3546         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3547             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3548             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3549             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3550             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3551         </fields>
3552         <links>
3553             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3554             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3555         </links>
3556         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3557             <actions>
3558                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3559                 <retrieve/>
3560                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3561                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3562             </actions>
3563         </permacrud>
3564     </class>
3565
3566         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
3567                 <fields>
3568                         <field name="sre_id" oils_persist:virtual="true" />
3569                         <field name="location" oils_persist:virtual="true" />
3570                         <field name="owning_lib" oils_persist:virtual="true" />
3571                         <field name="basic_holdings" oils_persist:virtual="true" />
3572                         <field name="basic_holdings_add" oils_persist:virtual="true" />
3573                         <field name="supplement_holdings" oils_persist:virtual="true" />
3574                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
3575                         <field name="index_holdings" oils_persist:virtual="true" />
3576                         <field name="index_holdings_add" oils_persist:virtual="true" />
3577                         <field name="online" oils_persist:virtual="true" />
3578                         <field name="missing" oils_persist:virtual="true" />
3579                         <field name="incomplete" oils_persist:virtual="true" />
3580                 </fields>
3581         </class>
3582
3583         <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">
3584                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3585                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3586                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3587                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3588                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3589                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3590                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3591                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3592                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3593                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3594                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3595                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3596                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3597                 </fields>
3598                 <links>
3599                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3600                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3601                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3602                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3603                 </links>
3604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3605                         <actions>
3606                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3607                                 <retrieve/>
3608                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3609                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3610                         </actions>
3611                 </permacrud>
3612         </class>
3613
3614         <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">
3615                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3616                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3617                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3618                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3619                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3620                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3621                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3622                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3623                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3624                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3625                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3626                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3627                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3628                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3629                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3630                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3631                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3632                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3633                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3634                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3635                 </fields>
3636                 <links>
3637                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3638                 </links>
3639                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3640                         <actions>
3641                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
3642                                         <context link="subscription" field="owning_lib" />
3643                                 </create>
3644                                 <retrieve />
3645                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
3646                                         <context link="subscription" field="owning_lib" />
3647                                 </update>
3648                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
3649                                         <context link="subscription" field="owning_lib" />
3650                                 </delete>
3651                         </actions>
3652                 </permacrud>
3653         </class>
3654
3655         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3656                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3657                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3658                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
3659                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3660                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3661                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3662                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3663                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3664                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3665                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
3666                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3667                 </fields>
3668                 <links>
3669                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3670                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3671                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
3672                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
3673                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
3674                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
3675                 </links>
3676                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3677                         <actions>
3678                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3679                                 <retrieve />
3680                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3681                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3682                         </actions>
3683                 </permacrud>
3684         </class>
3685
3686         <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">
3687                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
3688                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3689                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3690                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3691                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3692                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3693                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3694                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3695                 </fields>
3696                 <links>
3697                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3698                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3699                 </links>
3700                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3701                 </permacrud>
3702         </class>
3703
3704         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3705                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3706                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3707                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3708                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
3709                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3710                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
3711                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3712                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3713                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3714                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3715                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3716                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
3717                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3718                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3719                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3720                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3721                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3722                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3723                 </fields>
3724                 <links>
3725                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3726                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3727                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3728                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3729                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3730                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3731                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3732                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
3733                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
3734                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
3735                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
3736                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
3737                 </links>
3738                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3739                         <actions>
3740                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3741                                 <retrieve />
3742                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3743                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3744                         </actions>
3745                 </permacrud>
3746         </class>
3747
3748         <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">
3749                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
3750                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3751                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3752                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3753                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3754                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3755                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3756                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3757                 </fields>
3758                 <links>
3759                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3760                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3761                 </links>
3762                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3763                         <actions>
3764                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3765                                         <context link="distribution" field="holding_lib" />
3766                                 </create>
3767                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
3768                                         <context link="distribution" field="holding_lib" />
3769                                 </retrieve>
3770                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3771                                         <context link="distribution" field="holding_lib" />
3772                                 </update>
3773                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
3774                                         <context link="distribution" field="holding_lib" />
3775                                 </delete>
3776                         </actions>
3777                 </permacrud>
3778         </class>
3779
3780         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3781                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3782                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3783                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3784                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3785                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3786                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
3787                 </fields>
3788                 <links>
3789                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3790                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3791                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
3792                 </links>
3793                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3794                         <actions>
3795                                 <create permission="ADMIN_SERIAL_STREAM">
3796                                         <context link="distribution" field="holding_lib" />
3797                                 </create>
3798                                 <retrieve />
3799                                 <update permission="ADMIN_SERIAL_STREAM">
3800                                         <context link="distribution" field="holding_lib" />
3801                                 </update>
3802                                 <delete permission="ADMIN_SERIAL_STREAM">
3803                                         <context link="distribution" field="holding_lib" />
3804                                 </delete>
3805                         </actions>
3806                 </permacrud>
3807         </class>
3808
3809         <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">
3810                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
3811                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3812                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3813                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3814                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
3815                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
3816                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3817                 </fields>
3818                 <links>
3819                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3820                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
3821                 </links>
3822                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3823                         <actions>
3824                                 <create permission="ADMIN_SERIAL_STREAM">
3825                                         <context link="stream" jump="distribution" field="holding_lib" />
3826                                 </create>
3827                                 <retrieve permission="RECEIVE_SERIAL">
3828                                         <context link="stream" jump="distribution" field="holding_lib" />
3829                                 </retrieve>
3830                                 <update permission="ADMIN_SERIAL_STREAM">
3831                                         <context link="stream" jump="distribution" field="holding_lib" />
3832                                 </update>
3833                                 <delete permission="ADMIN_SERIAL_STREAM">
3834                                         <context link="stream" jump="distribution" field="holding_lib" />
3835                                 </delete>
3836                         </actions>
3837                 </permacrud>
3838         </class>
3839
3840         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
3841                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
3842                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3843                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3844                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3845                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3846                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3847                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3848                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
3849                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3850                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
3851                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
3852                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
3853                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
3854                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3855                 </fields>
3856                 <links>
3857                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3858                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3859                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3860                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
3861                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
3862                 </links>
3863                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3864                         <actions>
3865                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
3866                                         <context link="subscription" field="owning_lib" />
3867                                 </create>
3868                                 <retrieve/>
3869                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
3870                                         <context link="subscription" field="owning_lib" />
3871                                 </update>
3872                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
3873                                         <context link="subscription" field="owning_lib" />
3874                                 </delete>
3875                         </actions>
3876                 </permacrud>
3877         </class>
3878
3879         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
3880                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3881                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3882                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3883                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3884                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3885                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3886                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3887                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3888                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3889                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3890                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3891                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3892                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
3893                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3894                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3895                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3896                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3897                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3898                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3899                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3900                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3901                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3902                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3903                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3904                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3905                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3906                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3907                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3908                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3909                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3910                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3911                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3912                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3913                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
3914                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
3915                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
3916                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
3917                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3918                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3919                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3920                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3921                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3922                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3923                 </fields>
3924                 <links>
3925                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3926                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3927                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3928                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3929                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3930                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3931                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3932                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3933                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3934                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3935                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3936                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3937                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3938                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3939                 </links>
3940                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3941                         <actions>
3942                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3943                                 <retrieve/>
3944                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3945                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3946                         </actions>
3947                 </permacrud>
3948         </class>
3949
3950         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
3951                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
3952                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3953                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3954                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3955                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3956                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3957                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
3958                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3959                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
3960                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
3961                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
3962                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
3963                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
3964                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3965                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
3966                 </fields>
3967                 <links>
3968                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3969                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3970                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
3971                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3972                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
3973                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3974                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
3975                 </links>
3976                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3977                         <actions>
3978                                 <create permission="ADMIN_SERIAL_ITEM">
3979                                         <context link="stream" jump="distribution" field="holding_lib" />
3980                                 </create>
3981                                 <retrieve permission="ADMIN_SERIAL_ITEM">
3982                                         <context link="stream" jump="distribution" field="holding_lib" />
3983                                 </retrieve>
3984                                 <update permission="ADMIN_SERIAL_ITEM">
3985                                         <context link="stream" jump="distribution" field="holding_lib" />
3986                                 </update>
3987                                 <delete permission="ADMIN_SERIAL_ITEM">
3988                                         <context link="stream" jump="distribution" field="holding_lib" />
3989                                 </delete>
3990                         </actions>
3991                 </permacrud>
3992         </class>
3993
3994         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
3995                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
3996                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3997                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
3998                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3999                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4000                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4001                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4002                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4003                 </fields>
4004                 <links>
4005                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4006                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4007                 </links>
4008                 <!-- Not available via PCRUD at this time -->
4009         </class>
4010
4011         <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">
4012                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4013                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4014                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4015                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4016                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4017                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4018                 </fields>
4019                 <links>
4020                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4021                 </links>
4022                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4023                         <actions>
4024                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4025                                         <context link="distribution" field="holding_lib" />
4026                                 </create>
4027                                 <retrieve/>
4028                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4029                                         <context link="distribution" field="holding_lib" />
4030                                 </update>
4031                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4032                                         <context link="distribution" field="holding_lib" />
4033                                 </create>
4034                         </actions>
4035                 </permacrud>
4036         </class>
4037
4038         <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">
4039                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4040                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4041                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4042                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4043                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4044                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4045                 </fields>
4046                 <links>
4047                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4048                 </links>
4049                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4050                         <actions>
4051                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4052                                         <context link="distribution" field="holding_lib" />
4053                                 </create>
4054                                 <retrieve/>
4055                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4056                                         <context link="distribution" field="holding_lib" />
4057                                 </update>
4058                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4059                                         <context link="distribution" field="holding_lib" />
4060                                 </create>
4061                         </actions>
4062                 </permacrud>
4063         </class>
4064
4065         <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">
4066                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4067                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4068                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4069                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4070                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4071                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4072                 </fields>
4073                 <links>
4074                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4075                 </links>
4076                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4077                         <actions>
4078                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4079                                         <context link="distribution" field="holding_lib" />
4080                                 </create>
4081                                 <retrieve/>
4082                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4083                                         <context link="distribution" field="holding_lib" />
4084                                 </update>
4085                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4086                                         <context link="distribution" field="holding_lib" />
4087                                 </create>
4088                         </actions>
4089                 </permacrud>
4090         </class>
4091
4092         <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">
4093                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4094                         <field name="id" reporter:datatype="id" />
4095                         <field name="owning_copy" reporter:datatype="link"/>
4096                         <field name="stat_cat" reporter:datatype="link"/>
4097                         <field name="stat_cat_entry" reporter:datatype="link"/>
4098                 </fields>
4099                 <links>
4100                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4101                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4102                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4103                 </links>
4104         </class>
4105         <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">
4106                 <fields oils_persist:primary="code">
4107                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4108                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4109                 </fields>
4110                 <links/>
4111         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4112             <actions>
4113                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4114                 <retrieve/>
4115                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4116                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4117             </actions>
4118         </permacrud>
4119         </class>
4120         <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">
4121                 <fields oils_persist:primary="code">
4122                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4123                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4124                 </fields>
4125                 <links/>
4126         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4127             <actions>
4128                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4129                 <retrieve/>
4130                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4131                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4132             </actions>
4133         </permacrud>
4134         </class>
4135         <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">
4136                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4137                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4138                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4139                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4140                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4141                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4142                 </fields>
4143                 <links>
4144             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4145         </links>
4146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4147             <actions>
4148                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4149                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4150                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4151                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4152             </actions>
4153         </permacrud>
4154         </class>
4155         <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">
4156                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4157                         <field name="id" reporter:datatype="id" />
4158                         <field name="name" reporter:datatype="text"/>
4159                 </fields>
4160                 <links/>
4161         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4162             <actions>
4163                 <create permission="CREATE_LASSO" global_required="true"/>
4164                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4165                 <update permission="UPDATE_LASSO" global_required="true"/>
4166                 <delete permission="DELETE_LASSO" global_required="true"/>
4167             </actions>
4168         </permacrud>
4169         </class>
4170         <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">
4171                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4172                         <field name="id" reporter:datatype="id" />
4173                         <field name="lasso" reporter:datatype="link"/>
4174                         <field name="org_unit" reporter:datatype="org_unit"/>
4175                 </fields>
4176                 <links>
4177                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4178                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4179                 </links>
4180         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4181             <actions>
4182                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4183                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4184                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4185                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4186             </actions>
4187         </permacrud>
4188         </class>
4189         <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">
4190                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4191                         <field name="id" reporter:datatype="id" />
4192                         <field name="from_org" reporter:datatype="org_unit"/>
4193                         <field name="to_org" reporter:datatype="org_unit"/>
4194                         <field name="prox" reporter:datatype="int" />
4195                 </fields>
4196                 <links>
4197                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4198                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4199                 </links>
4200         </class>
4201         <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">
4202                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4203                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4204                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4205                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4206                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4207                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4208                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4209                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4210                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4211                 </fields>
4212                 <links/>
4213         </class>
4214         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4215                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4216                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4217                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4218                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4219                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4220                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4221                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4222                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4223                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4224                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4225                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4226                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4227                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4228                 </fields>
4229                 <links>
4230                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4231                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4232                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4233                 </links>
4234         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4235             <actions>
4236                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4237                 <retrieve/>
4238                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4239                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4240             </actions>
4241         </permacrud>
4242         </class>
4243         <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">
4244                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4245                         <field name="address_type"  reporter:datatype="text"/>
4246                         <field name="city"  reporter:datatype="text"/>
4247                         <field name="country"  reporter:datatype="text"/>
4248                         <field name="county"  reporter:datatype="text"/>
4249                         <field name="id" reporter:datatype="id" />
4250                         <field name="org_unit" reporter:datatype="org_unit"/>
4251                         <field name="post_code"  reporter:datatype="text"/>
4252                         <field name="state"  reporter:datatype="text"/>
4253                         <field name="street1"  reporter:datatype="text"/>
4254                         <field name="street2"  reporter:datatype="text"/>
4255                         <field name="valid" reporter:datatype="bool"/>
4256                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4257                 </fields>
4258                 <links>
4259                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4260                 </links>
4261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4262             <actions>
4263                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4264                 <retrieve/>
4265                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4266                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4267             </actions>
4268         </permacrud>
4269         </class>
4270         <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">
4271                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4272                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4273                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4274                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4275                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4276                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4277                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4278                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4279                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4280                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4281                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4282                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4283                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4284                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4285                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4286                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4287                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4288                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4289                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4290                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4291                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4292                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4293                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4294                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4295                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4296                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4297                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4298                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4299                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4300                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4301                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4302                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4303                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4304                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4305                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4306                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4307                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4308                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4309                 </fields>
4310                 <links>
4311                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4312                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4313                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4314                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4315                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4316                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4317                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4318                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4319                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4320                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4321                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4322                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4323                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4324                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4325                 </links>
4326         </class>
4327         <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">
4328                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4329                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4330                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4331                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4332                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4333                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4334                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4335                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4336                 </fields>
4337                 <links>
4338                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4339                 </links>
4340                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4341                         <actions>
4342                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4343                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4344                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4345                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4346                         </actions>
4347                 </permacrud>
4348         </class>
4349         <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">
4350                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4351                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4352                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4353                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4354                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4355                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4356                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4357                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4358                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4359                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4360                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4361                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4362                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4363                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4364                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4365                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4366                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4367                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4368                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4369                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4370                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4371                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4372                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4373                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4374                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4375                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4376                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4377                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4378                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4379                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4380                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4381                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4382                 </fields>
4383                 <links>
4384                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4385                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4386                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4387                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4388                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4389                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4390                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4391                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4392                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4393                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4394                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4395                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4396                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4397                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4398                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4399                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4400                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4401                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4402                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4403                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4404                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4405                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4406                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4407                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4408                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4409                 </links>
4410         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4411             <actions>
4412                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4413                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4414                     <context field="id"/>
4415                     <context field="parent_ou"/>
4416                                 </retrieve>
4417                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4418                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4419             </actions>
4420         </permacrud>
4421         </class>
4422         <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">
4423                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4424                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4425                         <field name="btype" reporter:datatype="text"/>
4426                         <field name="id" reporter:datatype="id" />
4427                         <field name="name"  reporter:datatype="text"/>
4428                         <field name="owner" reporter:datatype="link"/>
4429                         <field name="pub" reporter:datatype="bool"/>
4430                         <field name="create_time" reporter:datatype="timestamp" />
4431                 </fields>
4432                 <links>
4433                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4434                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4435                 </links>
4436         </class>
4437         <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">
4438                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4439                         <field name="id" reporter:datatype="id" />
4440                         <field name="bucket" reporter:datatype="link"/>
4441                         <field name="note" reporter:datatype="text" />
4442                 </fields>
4443                 <links>
4444                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4445                 </links>
4446         </class>
4447         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4448                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4449                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4450                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4451                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4452                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4453                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4454                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4455                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4456                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4457                 </fields>
4458                 <links>
4459                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4460                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
4461                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4462                 </links>
4463         </class>
4464         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4465                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4466                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4467                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4468                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4469                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4470                 </fields>
4471                 <links>
4472                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4473                 </links>
4474         </class>
4475     <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">
4476         <fields oils_persist:primary="field">
4477             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
4478             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
4479             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
4480         </fields>
4481         <links/>
4482         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4483             <actions>
4484                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
4485                 <retrieve />
4486                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
4487                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
4488             </actions>
4489         </permacrud>
4490     </class>
4491         <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">
4492                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4493                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4494                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4495                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4496                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4497                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4498                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
4499                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4500                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4501                 </fields>
4502                 <links>
4503                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4504                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
4505                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
4506                 </links>
4507         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4508             <actions>
4509                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
4510                 <retrieve />
4511                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
4512                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
4513             </actions>
4514         </permacrud>
4515         </class>
4516         <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">
4517                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
4518                         <field name="field" reporter:datatype="link"/>
4519                         <field name="id" reporter:datatype="id" />
4520                         <field name="source" reporter:datatype="link"/>
4521                         <field name="value"  reporter:datatype="text"/>
4522                 </fields>
4523                 <links>
4524                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4525                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4526                 </links>
4527         </class>
4528         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
4529                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
4530                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4531                         <field name="btype" reporter:datatype="text"/>
4532                         <field name="id" reporter:datatype="id" />
4533                         <field name="name"  reporter:datatype="text"/>
4534                         <field name="owner" reporter:datatype="link"/>
4535                         <field name="pub" reporter:datatype="bool"/>
4536                         <field name="create_time" reporter:datatype="timestamp" />
4537                 </fields>
4538                 <links>
4539                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4540                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
4541                 </links>
4542         </class>
4543         <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">
4544                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
4545                         <field name="id" reporter:datatype="id" />
4546                         <field name="bucket" reporter:datatype="link"/>
4547                         <field name="note" reporter:datatype="text" />
4548                 </fields>
4549                 <links>
4550                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4551                 </links>
4552         </class>
4553         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
4554                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4555                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4556                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4557                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4558                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
4559                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
4560                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4561                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4562                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4563                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4564                 </fields>
4565                 <links>
4566                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4567                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4568                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4569                 </links>
4570         </class>
4571         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
4572                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
4573                         <field name="id" reporter:datatype="id" />
4574                         <field name="ind1" />
4575                         <field name="ind2" />
4576                         <field name="record" />
4577                         <field name="subfield" />
4578                         <field name="tag" />
4579                         <field name="value" />
4580                 </fields>
4581                 <links>
4582                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4583                 </links>
4584         </class>
4585         <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">
4586                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
4587                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
4588                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4589                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
4590                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4591                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
4592                 </fields>
4593                 <links>
4594                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4595                 </links>
4596         </class>
4597         <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">
4598                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
4599                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4600                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
4601                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
4602                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
4603                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4604                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4605                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
4606                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
4607                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
4608                 </fields>
4609                 <links>
4610                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
4611                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
4612                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
4613                 </links>
4614         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4615             <actions>
4616                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
4617                 <retrieve/>
4618                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
4619                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
4620             </actions>
4621         </permacrud>
4622         </class>
4623         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
4624                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
4625                         <field name="create_date" reporter:datatype="timestamp"/>
4626                         <field name="creator" reporter:datatype="link"/>
4627                         <field name="edit_date" reporter:datatype="timestamp"/>
4628                         <field name="editor" reporter:datatype="link"/>
4629                         <field name="id" reporter:datatype="id" />
4630                         <field name="pub" reporter:datatype="bool"/>
4631                         <field name="record" reporter:datatype="link"/>
4632                         <field name="value"  reporter:datatype="text"/>
4633                 </fields>
4634                 <links>
4635                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4636                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4637                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4638                 </links>
4639         </class>
4640         <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">
4641                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4642                         <field name="balance_owed" reporter:datatype="money" />
4643                         <field name="total_owed" reporter:datatype="money" />
4644                         <field name="total_paid" reporter:datatype="money" />
4645                         <field name="usr" reporter:datatype="link"/>
4646                 </fields>
4647                 <links>
4648                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4649                 </links>
4650         </class>
4651         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
4652                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4653                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
4654                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4655                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
4656                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4657                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
4658                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
4659                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4660                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4661                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4662                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4663                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4664                 </fields>
4665                 <links>
4666                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4667                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4668                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4669                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4670                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4671                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4672                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4673                 </links>
4674         </class>
4675         <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">
4676                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
4677                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
4678                         <field name="quality" reporter:datatype="int" />
4679                         <field name="source" reporter:datatype="text"/>
4680                         <field name="transcendant" reporter:datatype="bool"/>
4681                 </fields>
4682                 <links/>
4683         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4684             <actions>
4685                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
4686                 <retrieve/>
4687                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
4688                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
4689             </actions>
4690         </permacrud>
4691         </class>
4692         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
4693                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4694                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4695                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4696                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4697                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4698                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4699                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
4700                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4701                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4702                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4703                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4704                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4705                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4706                 </fields>
4707                 <links>
4708                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4709                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4710                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4711                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4712                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4713                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4714                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4715                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4716                 </links>
4717         </class>
4718         <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">
4719                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
4720                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4721                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4722                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4723                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
4724                 </fields>
4725                 <links>
4726                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4727                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4728                 </links>
4729         </class>
4730         <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">
4731                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
4732                         <field name="bucket" reporter:datatype="link"/>
4733                         <field name="id" reporter:datatype="id" />
4734                         <field name="target_user" reporter:datatype="link"/>
4735                         <field name="create_time" reporter:datatype="timestamp" />
4736                         <field name="pos" reporter:datatype="int" />
4737                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4738                 </fields>
4739                 <links>
4740                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
4741                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4742             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
4743                 </links>
4744         </class>
4745         <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">
4746                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
4747                         <field name="id" reporter:datatype="id" />
4748                         <field name="item" reporter:datatype="link"/>
4749                         <field name="note" reporter:datatype="text" />
4750                 </fields>
4751                 <links>
4752                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
4753                 </links>
4754         </class>
4755         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
4756                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4757                         <field name="balance_owed" reporter:datatype="money" />
4758                         <field name="total_owed" reporter:datatype="money" />
4759                         <field name="total_paid" reporter:datatype="money" />
4760                         <field name="usr" reporter:datatype="link"/>
4761                 </fields>
4762                 <links>
4763                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4764                 </links>
4765         </class>
4766         <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">
4767                 <fields oils_persist:primary="code" oils_persist:sequence="">
4768                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
4769                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4770                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4771                 </fields>
4772                 <links/>
4773         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4774             <actions>
4775                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4776                 <retrieve/>
4777                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4778                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4779             </actions>
4780         </permacrud>
4781         </class>
4782         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
4783                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4784                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4785                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4786                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4787                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4788                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4789                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4790                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4791                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4792                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4793                 </fields>
4794                 <links>
4795                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4796                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4797                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4798                 </links>
4799         </class>
4800         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
4801                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4802                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4803                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4804                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4805                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4806                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4807                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4808                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4809                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4810                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4811                 </fields>
4812                 <links>
4813                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4814                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4815                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4816                 </links>
4817         </class>
4818         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
4819                 <fields oils_persist:primary="id" oils_persist:sequence="">
4820                         <field name="checkin_lib" reporter:datatype="link"/>
4821                         <field name="checkin_staff" reporter:datatype="link"/>
4822                         <field name="checkin_time" reporter:datatype="timestamp"/>
4823                         <field name="circ_lib"  reporter:datatype="org_unit"/>
4824                         <field name="circ_staff" reporter:datatype="link"/>
4825                         <field name="desk_renewal" reporter:datatype="bool"/>
4826                         <field name="due_date" reporter:datatype="timestamp"/>
4827                         <field name="duration" reporter:datatype="interval"/>
4828                         <field name="duration_rule" reporter:datatype="link"/>
4829                         <field name="fine_interval" reporter:datatype="interval"/>
4830                         <field name="id" reporter:datatype="id" />
4831                         <field name="max_fine" reporter:datatype="money" />
4832                         <field name="max_fine_rule" reporter:datatype="link"/>
4833                         <field name="opac_renewal" reporter:datatype="bool"/>
4834                         <field name="phone_renewal" reporter:datatype="bool"/>
4835                         <field name="recurring_fine" reporter:datatype="money" />
4836                         <field name="recurring_fine_rule" reporter:datatype="link"/>
4837                         <field name="renewal_remaining" reporter:datatype="int" />
4838             <field name="grace_period" reporter:datatype="interval" />
4839                         <field name="stop_fines" reporter:datatype="text"/>
4840                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
4841                         <field name="target_copy" reporter:datatype="link"/>
4842                         <field name="usr" reporter:datatype="link"/>
4843                         <field name="xact_finish" reporter:datatype="timestamp" />
4844                         <field name="xact_start" reporter:datatype="timestamp" />
4845                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4846                 </fields>
4847                 <links>
4848                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4849                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4850                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4851                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4852                 </links>
4853         </class>
4854         <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">
4855                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
4856                         <field name="field" reporter:datatype="link"/>
4857                         <field name="id" reporter:datatype="id" />
4858                         <field name="source" reporter:datatype="link"/>
4859                         <field name="value" reporter:datatype="text"/>
4860                 </fields>
4861                 <links>
4862                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4863                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4864                 </links>
4865         </class>
4866         <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">
4867                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
4868                         <field name="high" reporter:datatype="money" />
4869                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4870                         <field name="low" reporter:datatype="money" />
4871                         <field name="name" reporter:datatype="text"/>
4872                         <field name="normal" reporter:datatype="money" />
4873                         <field name="recurrence_interval" reporter:datatype="interval"/>
4874             <field name="grace_period" reporter:datatype="interval" />
4875                 </fields>
4876                 <links/>
4877         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4878             <actions>
4879                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4880                 <retrieve/>
4881                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4882                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4883             </actions>
4884         </permacrud>
4885         </class>
4886         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
4887                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4888                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4889                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4890                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4891                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
4892                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
4893                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4894                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4895                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4896                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
4897                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4898                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4899                 </fields>
4900                 <links>
4901                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4902                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4903                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4904                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4905                 </links>
4906         </class>
4907         <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">
4908                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4909                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4910                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4911                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4912                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4913                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4914                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4915                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4916                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4917                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4918                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4919                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4920                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4921                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4922                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4923                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4924                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4925                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4926                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4927                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4928                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4929                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4930                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4931                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
4932                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4933                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4934                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4935                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4936                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4937                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4938                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4939                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4940                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4941                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4942                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4943                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4944                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4945                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4946                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4947                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4948                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
4949                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4950                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
4951                 </fields>
4952                 <links>
4953                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4954                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4955                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4956                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4957                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4958                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4959                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4960                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4961                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4962                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4963                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4964                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4965                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4966                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4967                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
4968                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
4969                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
4970                 </links>
4971         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4972             <actions>
4973                 <create permission="CREATE_COPY">
4974                     <context link="call_number" field="owning_lib"/>
4975                 </create>
4976                 <retrieve/>
4977                 <update permission="UPDATE_COPY">
4978                     <context link="call_number" field="owning_lib"/>
4979                 </update>
4980                 <delete permission="DELETE_COPY">
4981                     <context link="call_number" field="owning_lib"/>
4982                 </delete>
4983             </actions>
4984         </permacrud>
4985         </class>
4986
4987         <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">
4988                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
4989                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
4990                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
4991                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4992                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4993                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4994                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4995                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4996                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
4997                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
4998                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
4999                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5000                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5001                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5002                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5003                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5004                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5005                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5006                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5007                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5008                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5009                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5010                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5011                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5012                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5013                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5014                 </fields>
5015                 <links>
5016                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5017                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5018                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5019                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5020                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5021                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5022                 </links>
5023                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5024                         <actions>
5025                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5026                                 <retrieve />
5027                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5028                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5029                         </actions>
5030                 </permacrud>
5031         </class>
5032
5033         <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">
5034                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5035                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5036                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5037                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5038                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5039                 </fields>
5040                 <links/>
5041         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5042             <actions>
5043                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5044                 <retrieve/>
5045                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5046                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5047             </actions>
5048         </permacrud>
5049         </class>
5050         <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">
5051                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5052                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5053                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5054                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5055                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5056                 </fields>
5057                 <links/>
5058         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5059             <actions>
5060                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5061                 <retrieve/>
5062                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5063                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5064             </actions>
5065         </permacrud>
5066         </class>
5067         <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">
5068                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5069                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5070                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5071                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5072                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5073                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5074                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5075                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5076                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5077                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5078                 </fields>
5079                 <links>
5080                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5081                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5082                 </links>
5083         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5084             <actions>
5085                 <create permission="CREATE_PERM" global_required="true"/>
5086                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5087                 <update permission="UPDATE_PERM" global_required="true"/>
5088                 <delete permission="DELETE_PERM" global_required="true"/>
5089             </actions>
5090         </permacrud>
5091         </class>
5092         <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">
5093                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5094                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5095                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5096                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5097                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5098                 </fields>
5099                 <links>
5100                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5101                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5102                 </links>
5103         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5104             <actions>
5105                 <create permission="ADMIN_SURVEY">
5106                     <context link="question" jump="survey" field="owner"/>
5107                 </create>
5108                 <retrieve/>
5109                 <update permission="ADMIN_SURVEY">
5110                     <context link="question" jump="survey" field="owner"/>
5111                 </update>
5112                 <delete permission="ADMIN_SURVEY">
5113                     <context link="question" jump="survey" field="owner"/>
5114                 </delete>
5115             </actions>
5116         </permacrud>
5117         </class>
5118         <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">
5119                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5120                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5121                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5122                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5123                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5124                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5125                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5126                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5127                 </fields>
5128                 <links>
5129                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5130                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5131                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5132                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5133                 </links>
5134         </class>
5135         <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">
5136                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5137                         <field name="balance_owed" reporter:datatype="money" />
5138                         <field name="total_owed" reporter:datatype="money" />
5139                         <field name="total_paid" reporter:datatype="money" />
5140                         <field name="usr" reporter:datatype="link"/>
5141                 </fields>
5142                 <links>
5143                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5144                 </links>
5145         </class>
5146         <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">
5147                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5148                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5149                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5150                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5151                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5152                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5153                 </fields>
5154                 <links>
5155                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5156                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5157                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5158                 </links>
5159         </class>
5160         <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">
5161                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5162                         <field name="field" reporter:datatype="link"/>
5163                         <field name="id" reporter:datatype="id" />
5164                         <field name="source" reporter:datatype="link"/>
5165                         <field name="value" reporter:datatype="text"/>
5166                 </fields>
5167                 <links>
5168                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5169                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5170                 </links>
5171         </class>
5172         <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">
5173                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5174                         <field name="field" reporter:datatype="link"/>
5175                         <field name="id" reporter:datatype="id" />
5176                         <field name="source" reporter:datatype="link"/>
5177                         <field name="value" reporter:datatype="text"/>
5178                 </fields>
5179                 <links>
5180                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5181                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5182                 </links>
5183         </class>
5184         <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">
5185                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5186                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5187                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5188                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5189                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5190                 </fields>
5191                 <links>
5192                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5193                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5194                 </links>
5195         </class>
5196         <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">
5197                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5198                         <field name="depth" reporter:datatype="int" />
5199                         <field name="grantable" reporter:datatype="bool"/>
5200                         <field name="grp" reporter:datatype="link"/>
5201                         <field name="id" reporter:datatype="id" />
5202                         <field name="perm" reporter:datatype="link"/>
5203                 </fields>
5204                 <links>
5205                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5206                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5207                 </links>
5208         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5209             <actions>
5210                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5211                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5212                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5213                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5214             </actions>
5215         </permacrud>
5216         </class>
5217         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5218                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5219                         <field name="items" oils_persist:virtual="true" />
5220                         <field name="btype" reporter:datatype="text"/>
5221                         <field name="id" reporter:datatype="id" />
5222                         <field name="name" reporter:datatype="text"/>
5223                         <field name="owner" reporter:datatype="link"/>
5224                         <field name="pub" reporter:datatype="bool"/>
5225                         <field name="create_time" reporter:datatype="timestamp" />
5226                 </fields>
5227                 <links>
5228                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5229                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5230                 </links>
5231         </class>
5232         <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">
5233                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5234                         <field name="id" reporter:datatype="id" />
5235                         <field name="bucket" reporter:datatype="link"/>
5236                         <field name="note" reporter:datatype="text" />
5237                 </fields>
5238                 <links>
5239                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5240                 </links>
5241         </class>
5242         <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">
5243                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5244                         <field name="id" reporter:datatype="int" />
5245                         <field name="usr" reporter:datatype="link"/>
5246                         <field name="work_ou" reporter:datatype="link"/>
5247                 </fields>
5248                 <links>
5249                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5250                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5251                 </links>
5252         </class>
5253         <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">
5254                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5255                         <field name="depth" reporter:datatype="int"/>
5256                         <field name="grantable" reporter:datatype="bool"/>
5257                         <field name="id" reporter:datatype="id" />
5258                         <field name="perm" reporter:datatype="link"/>
5259                         <field name="usr" reporter:datatype="link"/>
5260                 </fields>
5261                 <links>
5262                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5263                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5264                 </links>
5265         </class>
5266         <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">
5267                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5268                         <field name="object_id" reporter:datatype="text"/>
5269                         <field name="grantable" reporter:datatype="bool"/>
5270                         <field name="id" reporter:datatype="id" />
5271                         <field name="perm" reporter:datatype="link"/>
5272                         <field name="usr" reporter:datatype="link"/>
5273                         <field name="object_type" reporter:datatype="text"/>
5274                 </fields>
5275                 <links>
5276                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5277                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5278                 </links>
5279         </class>
5280         <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">
5281                 <fields oils_persist:primary="id" oils_persist:sequence="">
5282                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5283                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5284                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5285                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5286                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5287                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5288                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5289                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5290                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5291                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5292                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5293                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5294                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5295                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5296                 </fields>
5297                 <links>
5298                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5299                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5300                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5301                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5302                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5303                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5304                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5305                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5306                 </links>
5307         </class>
5308         <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">
5309                 <fields oils_persist:primary="id" oils_persist:sequence="">
5310                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5311                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5312                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5313                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5314                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5315                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5316                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5317                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5318                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5319                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5320                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5321                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5322                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5323                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5324                 </fields>
5325                 <links>
5326                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5327                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5328                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5329                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5330                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5331                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5332                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5333                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5334                 </links>
5335         </class>
5336         <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">
5337                 <fields oils_persist:primary="id" oils_persist:sequence="">
5338                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5339                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5340                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5341                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5342                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5343                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5344                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5345                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5346                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5347                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5348                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5349                 </fields>
5350                 <links>
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="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5355                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5356                 </links>
5357         </class>
5358         <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">
5359                 <fields oils_persist:primary="id" oils_persist:sequence="">
5360                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5361                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5362                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5363                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5364                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5365                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5366                         <field reporter:label="Accepting User" name="accepting_usr" />
5367                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5368                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5369                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5370                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5371                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5372                 </fields>
5373                 <links>
5374                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5375                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5376                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5377                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5378                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5379                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5380                 </links>
5381         </class>
5382         <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">
5383                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5384                         <field name="bucket" reporter:datatype="link"/>
5385                         <field name="id" reporter:datatype="id" />
5386                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5387                         <field name="create_time" reporter:datatype="timestamp" />
5388                         <field name="pos" reporter:datatype="int" />
5389                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5390                 </fields>
5391                 <links>
5392                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5393                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5394             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5395                 </links>
5396         </class>
5397         <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">
5398                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5399                         <field name="id" reporter:datatype="id" />
5400                         <field name="item" reporter:datatype="link"/>
5401                         <field name="note" reporter:datatype="text" />
5402                 </fields>
5403                 <links>
5404                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5405                 </links>
5406         </class>
5407         <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">
5408                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5409                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5410                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5411                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5412                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5413                 </fields>
5414                 <links>
5415                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5416                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5417                 </links>
5418         </class>
5419     <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">
5420         <fields oils_persist:primary="field">
5421             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5422             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5423             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5424         </fields>
5425         <links/>
5426         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5427             <actions>
5428                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
5429                 <retrieve />
5430                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
5431                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
5432             </actions>
5433         </permacrud>
5434     </class>
5435         <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">
5436                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5437                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5438                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5439                 </fields>
5440                 <links/>
5441         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5442             <actions>
5443                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5444                 <retrieve/>
5445                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5446                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5447             </actions>
5448         </permacrud>
5449         </class>
5450
5451
5452         <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">
5453                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5454                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5455                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5456                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5457                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5458                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5459                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5460                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5461                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5462                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5463                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5464                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5465                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5466                 </fields>
5467                 <links>
5468                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5469                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5470                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5471                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5472                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5473                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5474                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5475                 </links>
5476         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5477             <actions>
5478                 <create permission="TRANSIT_COPY">
5479                     <context link="target_copy" field="owner"/>
5480                 </create>
5481                 <retrieve/>
5482                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5483                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5484             </actions>
5485         </permacrud>
5486         </class>
5487         <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">
5488                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5489                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5490                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5491                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5492                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
5493                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5494                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5495                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5496                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5497                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5498                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5499                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5500                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5501                 </fields>
5502                 <links>
5503                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5504                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5505                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5506                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5507                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5508                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5509                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5510                 </links>
5511         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5512             <actions>
5513                 <create permission="TRANSIT_COPY" context_field="owner">
5514                     <context link="target_copy" field="circ_lib"/>
5515                 </create>
5516                 <retrieve/>
5517                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5518                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5519             </actions>
5520         </permacrud>
5521         </class>
5522         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
5523                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
5524                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5525                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
5526                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
5527                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
5528                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5529                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
5530                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5531                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
5532                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5533                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
5534                 </fields>
5535                 <links>
5536                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5537                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
5538                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
5539                 </links>
5540         </class>
5541         <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">
5542                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
5543                         <field name="grp" />
5544                         <field name="id" reporter:datatype="id" />
5545                         <field name="usr" />
5546                 </fields>
5547                 <links>
5548                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5549                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5550                 </links>
5551         </class>
5552         <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">
5553                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
5554                         <field name="id" reporter:datatype="id" />
5555                         <field name="fq_field" reporter:datatype="text"/>
5556                         <field name="identity_value" reporter:datatype="text"/>
5557                         <field name="translation" reporter:datatype="text"/>
5558                         <field name="string" reporter:datatype="text"/>
5559                 </fields>
5560                 <links>
5561                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
5562                 </links>
5563         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5564             <actions>
5565                 <create permission="CREATE_TRANSLATION" global_required="true"/>
5566                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
5567                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
5568                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
5569             </actions>
5570         </permacrud>
5571         </class>
5572         <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">
5573                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
5574                         <field name="id" reporter:datatype="id" />
5575                         <field name="fm_class" reporter:datatype="text"/>
5576                         <field name="field" reporter:datatype="text"/>
5577                         <field name="owner" reporter:datatype="org_unit"/>
5578                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
5579                 </fields>
5580                 <links>
5581                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5582                 </links>
5583         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5584             <actions>
5585                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5586                 <retrieve/>
5587                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5588                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5589             </actions>
5590         </permacrud>
5591         </class>
5592         <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">
5593                 <fields oils_persist:primary="code">
5594                         <field name="code" reporter:datatype="id" />
5595                         <field name="marc_code" reporter:datatype="text"/>
5596                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5597                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5598                 </fields>
5599                 <links/>
5600         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5601             <actions>
5602                 <create permission="CREATE_LOCALE" global_required="true"/>
5603                 <retrieve/>
5604                 <update permission="UPDATE_LOCALE" global_required="true"/>
5605                 <delete permission="DELETE_LOCALE" global_required="true"/>
5606             </actions>
5607         </permacrud>
5608         </class>
5609         <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">
5610                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
5611                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
5612                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
5613                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
5614             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
5615                 </fields>
5616                 <links>
5617                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5618                 </links>
5619         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5620             <actions>
5621                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
5622                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
5623                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
5624                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
5625             </actions>
5626         </permacrud>
5627         </class>
5628
5629         <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">
5630                 <fields oils_persist:primary="id">
5631                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5632                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5633                 </fields>
5634                 <links/>
5635         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5636             <actions>
5637                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5638                 <retrieve/>
5639                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5640                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5641             </actions>
5642         </permacrud>
5643         </class>
5644
5645         <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">
5646                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
5647                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5648                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5649                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
5650                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
5651                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
5652                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
5653                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
5654                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
5655                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5656                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
5657                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
5658                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
5659                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
5660                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
5661                         <field reporter:label="Title" name="title" reporter:datatype="text" />
5662                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
5663                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5664                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
5665                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
5666                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
5667                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
5668                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
5669                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
5670                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
5671                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5672                 </fields>
5673                 <links>
5674                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5675                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5676                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5677                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
5678                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
5679                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5680                 </links>
5681         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5682             <actions>
5683                 <create permission="user_request.create">
5684                     <context link="usr" field="home_ou"/>
5685                                 </create>
5686                 <retrieve permission="user_request.view">
5687                     <context link="usr" field="home_ou"/>
5688                                 </retrieve>
5689                 <update permission="user_request.update">
5690                     <context link="usr" field="home_ou"/>
5691                                 </update>
5692                 <delete permission="user_request.delete">
5693                     <context link="usr" field="home_ou"/>
5694                                 </delete>
5695             </actions>
5696         </permacrud>
5697         </class>
5698
5699         <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">
5700                 <fields oils_persist:primary="code">
5701                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
5702                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5703                 </fields>
5704                 <links/>
5705         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5706             <actions>
5707                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5708                 <retrieve/>
5709                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5710                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5711             </actions>
5712         </permacrud>
5713         </class>
5714
5715         <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">
5716                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
5717                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
5718                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
5719                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
5720                         <field reporter:label="Ratio" name="ratio" />
5721                 </fields>
5722                 <links>
5723                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
5724                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
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="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
5737                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
5738                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5739                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5740                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5741                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5742                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5743                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
5744                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
5745                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
5746                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
5747                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5748                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5749                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5750                         <field reporter:label="Email" name="email" reporter:datatype="text" />
5751                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
5752                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
5753                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
5754                 </fields>
5755                 <links>
5756                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5757                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5758             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
5759             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
5760             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
5761                 </links>
5762         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5763             <actions>
5764                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
5765                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
5766                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
5767                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
5768             </actions>
5769         </permacrud>
5770         </class>
5771
5772         <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">
5773                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
5774                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5775                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5776                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5777                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5778                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5779                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5780                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5781                 </fields>
5782                 <links>
5783                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5784                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5785                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5786                 </links>
5787         </class>
5788
5789         <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">
5790                 <fields oils_persist:primary="code">
5791                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
5792                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5793                 </fields>
5794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5795             <actions>
5796                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5797                 <retrieve/>
5798                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5799                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5800             </actions>
5801                 </permacrud>
5802         </class>
5803
5804         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
5805                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
5806                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
5807                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
5808                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5809                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
5810                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
5811                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
5812                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
5813                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
5814                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
5815                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
5816                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5817                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
5818                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
5819                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
5820                 </fields>
5821                 <links>
5822                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
5823                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5824                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
5825                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
5826                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
5827                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
5828                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
5829                 </links>
5830         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5831             <actions>
5832                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
5833                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
5834                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
5835                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
5836             </actions>
5837         </permacrud>
5838         </class>
5839
5840         <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">
5841                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
5842                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5843                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5844                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5845                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
5846                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
5847                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
5848                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5849                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
5850                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5851                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5852                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5853                 </fields>
5854                 <links>
5855                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5856                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5857                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5858                 </links>
5859         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5860             <actions>
5861                 <create   permission="ADMIN_INVOICE">
5862                                         <context link="invoice" field="receiver"/>
5863                                 </create>
5864                 <retrieve permission="ADMIN_INVOICE">
5865                                         <context link="invoice" field="receiver"/>
5866                                 </retrieve>
5867                 <update   permission="ADMIN_INVOICE">
5868                                         <context link="invoice" field="receiver"/>
5869                                 </update>
5870                                 <delete   permission="ADMIN_INVOICE">
5871                                         <context link="invoice" field="receiver"/>
5872                                 </delete>
5873             </actions>
5874         </permacrud>
5875         </class>
5876
5877         <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">
5878                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
5879                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5880                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5881                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5882                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5883                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
5884                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
5885                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5886                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5887                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5888                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5889                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5890                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5891                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
5892                         <field reporter:label="Target" name="target" reporter:datatype="int" />
5893                 </fields>
5894                 <links>
5895                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5896                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5897                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5898                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
5899                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5900                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
5901                 </links>
5902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5903             <actions>
5904                 <create   permission="ADMIN_INVOICE">
5905                                         <context link="invoice" field="receiver"/>
5906                                 </create>
5907                 <retrieve permission="ADMIN_INVOICE">
5908                                         <context link="invoice" field="receiver"/>
5909                                 </retrieve>
5910                 <update   permission="ADMIN_INVOICE">
5911                                         <context link="invoice" field="receiver"/>
5912                                 </update>
5913                                 <delete   permission="ADMIN_INVOICE">
5914                                         <context link="invoice" field="receiver"/>
5915                                 </delete>
5916             </actions>
5917         </permacrud>
5918         </class>
5919
5920         <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">
5921                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
5922                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
5923                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5924                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5925                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5926                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5927                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5928                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
5929                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5930                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
5931                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
5932                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
5933                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5934                 </fields>
5935                 <links>
5936                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5937                 </links>
5938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5939             <actions>
5940                 <create permission="ADMIN_PROVIDER">
5941                     <context link="provider" field="owner"/>
5942                 </create>
5943                 <retrieve permission="ADMIN_PROVIDER">
5944                     <context link="provider" field="owner"/>
5945                 </retrieve>
5946                 <update permission="ADMIN_PROVIDER">
5947                     <context link="provider" field="owner"/>
5948                 </update>
5949                 <delete permission="ADMIN_PROVIDER">
5950                     <context link="provider" field="owner"/>
5951                 </delete>
5952             </actions>
5953         </permacrud>
5954         </class>
5955
5956         <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">
5957                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
5958                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5959                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5960                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5961                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
5962                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
5963                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
5964         </fields>
5965                 <links>
5966                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5967                 </links>
5968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5969             <actions>
5970                 <create permission="ADMIN_PROVIDER">
5971                     <context link="provider" field="owner"/>
5972                 </create>
5973                 <retrieve permission="ADMIN_PROVIDER">
5974                     <context link="provider" field="owner"/>
5975                 </retrieve>
5976                 <update permission="ADMIN_PROVIDER">
5977                     <context link="provider" field="owner"/>
5978                 </update>
5979                 <delete permission="ADMIN_PROVIDER">
5980                     <context link="provider" field="owner"/>
5981                 </delete>
5982             </actions>
5983         </permacrud>
5984     </class>
5985         <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">
5986                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
5987                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
5988                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5989                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5990                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5991                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
5992                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5993                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5994                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
5995                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
5996                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
5997                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
5998                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5999                 </fields>
6000                 <links>
6001                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6002                 </links>
6003         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6004             <actions>
6005                 <create permission="ADMIN_PROVIDER">
6006                     <context link="contact" jump='provider' field="owner"/>
6007                 </create>
6008                 <retrieve permission="ADMIN_PROVIDER">
6009                     <context link="contact" jump='provider' field="owner"/>
6010                 </retrieve>
6011                 <update permission="ADMIN_PROVIDER">
6012                     <context link="contact" jump='provider' field="owner"/>
6013                 </update>
6014                 <delete permission="ADMIN_PROVIDER">
6015                     <context link="contact" jump='provider' field="owner"/>
6016                 </delete>
6017             </actions>
6018         </permacrud>
6019         </class>
6020
6021         <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">
6022                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6023                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6024                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6025                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6026                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6027                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6028                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6029                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6030                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6031                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6032                 </fields>
6033                 <links>
6034                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6035                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6036                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6037                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6038                 </links>
6039                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6040                 </permacrud>
6041         </class>
6042
6043         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6044                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6045                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6046                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6047                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6048                 </fields>
6049                 <links>
6050             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6051                 </links>
6052                 <!--
6053                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6054                         But here's what it should look like if we ever do use pcrud.
6055                 -->
6056                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6057                         <actions>
6058                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6059                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6060                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6061                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6062                         </actions>
6063                 </permacrud>
6064         </class>
6065
6066         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6067                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6068                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6069                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6070                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6071                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6072                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6073                 </fields>
6074                 <links>
6075                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6076                 </links>
6077                 <!--
6078                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6079                         But here's what it should look like if we ever do use pcrud.
6080                 -->
6081                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6082                         <actions>
6083                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6084                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6085                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6086                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6087                         </actions>
6088                 </permacrud>
6089         </class>
6090
6091         <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">
6092                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6093                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6094                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6095                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6096                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6097                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6098                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6099                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6100                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6101                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6102                 </fields>
6103                 <links>
6104                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6105                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6106             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6107             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6108                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6109                 </links>
6110         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6111             <actions>
6112                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6113                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6114                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6115                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6116             </actions>
6117         </permacrud>
6118         </class>
6119
6120         <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">
6121                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6122                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6123                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6124                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6125                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6126                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6127                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6128                 </fields>
6129                 <links>
6130                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6131                 </links>
6132                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6133                         <actions>
6134                                 <create permission="ADMIN_FUNDING_SOURCE">
6135                     <context link="funding_source" field="owner"/>
6136                 </create>
6137                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6138                     <context link="funding_source" field="owner"/>
6139                 </retrieve>
6140                                 <update permission="ADMIN_FUNDING_SOURCE">
6141                     <context link="funding_source" field="owner"/>
6142                 </update>
6143                                 <delete permission="ADMIN_FUNDING_SOURCE">
6144                     <context link="funding_source" field="owner"/>
6145                 </delete>
6146                         </actions>
6147                 </permacrud>
6148         </class>
6149
6150         <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">
6151                 <fields oils_persist:primary="id">
6152                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6153                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6154                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6155                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6156                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6157                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6158                 </fields>
6159                 <links>
6160                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6161                 </links>
6162                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6163                 </permacrud>
6164         </class>
6165
6166         <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">
6167                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6168                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6169                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6170                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6171                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6172                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6173                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6174                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6175                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6176                 </fields>
6177                 <links>
6178                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6179                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6180                 </links>
6181                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6182                         <actions>
6183                                 <create permission="ADMIN_ACQ_FUND">
6184                     <context link="fund" field="org"/>
6185                 </create>
6186                                 <retrieve permission="ADMIN_ACQ_FUND">
6187                     <context link="fund" field="org"/>
6188                 </retrieve>
6189                                 <update permission="ADMIN_ACQ_FUND">
6190                     <context link="fund" field="org"/>
6191                 </update>
6192                                 <delete permission="ADMIN_ACQ_FUND">
6193                     <context link="fund" field="org"/>
6194                 </delete>
6195                         </actions>
6196                 </permacrud>
6197         </class>
6198
6199         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6200                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6201                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6202                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6203                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6204                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6205                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6206                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6207                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6208                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6209                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6210                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6211                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6212                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6213                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6214                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6215                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6216                 </fields>
6217                 <links>
6218                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6219                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6220             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6221             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6222             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6223                 </links>
6224         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6225             <actions>
6226                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6227                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6228                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6229                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6230             </actions>
6231         </permacrud>
6232         </class>
6233
6234         <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">
6235                 <fields oils_persist:primary="fund">
6236                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6237                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6238                 </fields>
6239                 <links>
6240                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6241                 </links>
6242         </class>
6243
6244         <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">
6245                 <fields oils_persist:primary="fund">
6246                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6247                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6248                 </fields>
6249                 <links>
6250                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6251                 </links>
6252         </class>
6253
6254         <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">
6255                 <fields oils_persist:primary="fund">
6256                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6257                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6258                 </fields>
6259                 <links>
6260                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6261                 </links>
6262         </class>
6263
6264         <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">
6265                 <fields oils_persist:primary="fund">
6266                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6267                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6268                 </fields>
6269                 <links>
6270                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6271                 </links>
6272         </class>
6273
6274         <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">
6275                 <fields oils_persist:primary="fund">
6276                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6277                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6278                 </fields>
6279                 <links>
6280                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6281                 </links>
6282         </class>
6283
6284    <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">
6285         <fields oils_persist:primary="fund">
6286             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6287             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6288         </fields>
6289         <links>
6290             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6291         </links>
6292     </class>
6293
6294    <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">
6295         <fields oils_persist:primary="fund">
6296             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6297             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6298         </fields>
6299         <links>
6300             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6301         </links>
6302     </class>
6303
6304    <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">
6305         <fields oils_persist:primary="fund">
6306             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6307             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6308         </fields>
6309         <links>
6310             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6311         </links>
6312     </class>
6313
6314    <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">
6315         <fields oils_persist:primary="fund">
6316             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6317             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6318         </fields>
6319         <links>
6320             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6321         </links>
6322     </class>
6323
6324    <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">
6325         <fields oils_persist:primary="fund">
6326             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6327             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6328         </fields>
6329         <links>
6330             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6331         </links>
6332     </class>
6333
6334         <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">
6335                 <fields oils_persist:primary="funding_source">
6336                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6337                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6338                 </fields>
6339                 <links>
6340                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6341                 </links>
6342         </class>
6343
6344         <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">
6345                 <fields oils_persist:primary="funding_source">
6346                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6347                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6348                 </fields>
6349                 <links>
6350                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6351                 </links>
6352         </class>
6353
6354         <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">
6355                 <fields oils_persist:primary="funding_source">
6356                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6357                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6358                 </fields>
6359                 <links>
6360                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6361                 </links>
6362         </class>
6363
6364         <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">
6365                 <fields oils_persist:primary="fund">
6366                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6367                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6368                 </fields>
6369                 <links>
6370                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6371                 </links>
6372         </class>
6373
6374         <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">
6375                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6376                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6377                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6378                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6379                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6380                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6381                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6382                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6383                 </fields>
6384                 <links>
6385                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6386                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6387                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6388                 </links>
6389                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6390                         <actions>
6391                                 <create permission="ADMIN_ACQ_FUND">
6392                     <context link="fund" field="org"/>
6393                 </create>
6394                                 <retrieve permission="ADMIN_ACQ_FUND">
6395                     <context link="fund" field="org"/>
6396                 </retrieve>
6397                                 <update permission="ADMIN_ACQ_FUND">
6398                     <context link="fund" field="org"/>
6399                 </update>
6400                                 <delete permission="ADMIN_ACQ_FUND">
6401                     <context link="fund" field="org"/>
6402                 </delete>
6403                         </actions>
6404                 </permacrud>
6405         </class>
6406
6407     <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">
6408         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6409             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6410             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6411             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6412             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6413             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6414             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6415             <field reporter:label="Note" name="note" reporter:datatype="text" />
6416             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6417         </fields>
6418         <links>
6419             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6420             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6421             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6422         </links>
6423                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6424                         <actions>
6425                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6426                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6427                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6428                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6429                         </actions>
6430                 </permacrud>
6431     </class>
6432
6433         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6434                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6435                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6436                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6437                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6438                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6439                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6440                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6441                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6442                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6443                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6444                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6445                 </fields>
6446                 <links>
6447                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6448                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6449                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6450                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6451                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6452                 </links>
6453                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6454                         <actions>
6455                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6456                         </actions>
6457                 </permacrud>
6458         </class>
6459
6460         <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">
6461                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6462                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6463                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6464                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6465                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6466                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6467                 </fields>
6468                 <links>
6469                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6470                 </links>
6471                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6472                         <actions>
6473                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6474                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6475                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6476                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6477                         </actions>
6478                 </permacrud>
6479         </class>
6480
6481         <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">
6482                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6483                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6484                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6485                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6486                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6487                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6488                         <field reporter:label="State" name="state" reporter:datatype="text" />
6489                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6490                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6491                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6492                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
6493                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6494                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6495                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6496                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
6497                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6498                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
6499                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
6500                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
6501                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
6502                 </fields>
6503                 <links>
6504                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6505                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6506                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6507                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
6508                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6509                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
6510                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
6511                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
6512                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6513                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6514                 </links>
6515                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6516                         <actions>
6517                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6518                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6519                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6520                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6521                         </actions>
6522                 </permacrud>
6523         </class>
6524
6525         <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">
6526                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
6527                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6528                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6529                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6530                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
6531                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6532                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6533                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6534                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
6535                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6536                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6537                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6538                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6539                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
6540                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6541                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6542                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6543                 </fields>
6544                 <links>
6545                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
6546                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6547                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6548                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6549                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6550                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6551                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6552                 </links>
6553                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6554             <actions>
6555                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6556             </actions>
6557                 </permacrud>
6558         </class>
6559
6560         <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">
6561                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
6562                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6563                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6564                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6565                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6566                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6567                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6568                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
6569                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6570                 </fields>
6571                 <links>
6572                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6573                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6574                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6575                 </links>
6576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6577             <actions>
6578                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6579                     <context link="purchase_order" field="ordering_agency"/>
6580                 </retrieve>
6581                 <create permission="CREATE_PURCHASE_ORDER">
6582                     <context link="purchase_order" field="ordering_agency"/>
6583                 </create>
6584                 <update permission="CREATE_PURCHASE_ORDER">
6585                     <context link="purchase_order" field="ordering_agency"/>
6586                 </update>
6587                 <delete permission="CREATE_PURCHASE_ORDER">
6588                     <context link="purchase_order" field="ordering_agency"/>
6589                 </delete>
6590             </actions>
6591                 </permacrud>
6592         </class>
6593
6594         <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">
6595                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
6596                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6597                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6598                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6599                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
6600                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6601                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
6602                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6603                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
6604                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
6605                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6606                 </fields>
6607                 <links>
6608                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6609                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6610                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6611                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6612                 </links>
6613                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6614             <actions>
6615                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6616                     <context link="purchase_order" field="ordering_agency"/>
6617                 </retrieve>
6618                 <create permission="CREATE_PURCHASE_ORDER">
6619                     <context link="purchase_order" field="ordering_agency"/>
6620                 </create>
6621                 <update permission="CREATE_PURCHASE_ORDER">
6622                     <context link="purchase_order" field="ordering_agency"/>
6623                 </update>
6624                 <delete permission="CREATE_PURCHASE_ORDER">
6625                     <context link="purchase_order" field="ordering_agency"/>
6626                 </delete>
6627             </actions>
6628                 </permacrud>
6629         </class>
6630
6631         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
6632                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
6633                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
6634                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
6635                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
6636                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6637                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6638                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6639                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6640                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
6641                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
6642                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
6643                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
6644                         <field reporter:label="State" name="state" reporter:datatype="text" />
6645                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6646                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6647                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
6648                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6649                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6650                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
6651                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
6652                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
6653                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
6654                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
6655                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
6656                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
6657                 </fields>
6658                 <links>
6659                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6660                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6661                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6662                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6663                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6664                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6665                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6666                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
6667                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
6668                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
6669                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6670                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
6671                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6672                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
6673                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
6674                 </links>
6675                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6676                         <actions>
6677                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
6678                                         <context link="purchase_order" field="ordering_agency"/>
6679                                         <context link="picklist" field="org_unit"/>
6680                                 </retrieve>
6681                         </actions>
6682                 </permacrud>
6683         </class>
6684
6685         <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">
6686                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
6687                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6688                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6689                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6690                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
6691                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6692                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6693                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
6694                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6695                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6696                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
6697                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
6698                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6699                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6700                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
6701                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
6702                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
6703                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6704                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
6705                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6706                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6707                 </fields>
6708                 <links>
6709                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
6710                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6711                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6712                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6713                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6714                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6715                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6716                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6717                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6718                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6719                 </links>
6720                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6721                         <actions>
6722                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6723                                         <context link="purchase_order" field="ordering_agency"/>
6724                                         <context link="picklist" field="org_unit"/>
6725                                 </retrieve>
6726                         </actions>
6727                 </permacrud>
6728         </class>
6729
6730         <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">
6731                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
6732                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
6733                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6734                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6735                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
6736                 </fields>
6737                 <links>
6738                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6739                 </links>
6740                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6741                         <actions>
6742                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6743                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
6744                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6745                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6746                         </actions>
6747                 </permacrud>
6748         </class>
6749
6750         <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">
6751                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
6752                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
6753                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
6754                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6755                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6756                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6757                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6758                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6759                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
6760                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6761                 </fields>
6762                 <links>
6763                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6764                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6765                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6766                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
6767                 </links>
6768         </class>
6769
6770         <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">
6771                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
6772                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
6773                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
6774                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
6775                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
6776                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
6777                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
6778                 </fields>
6779                 <links>
6780                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6781                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
6782                 </links>
6783         </class>
6784
6785         <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">
6786                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
6787                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
6788                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6789                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
6790                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
6791                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
6792                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
6793                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6794                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
6795                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
6796                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
6797                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
6798                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6799                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
6800                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6801                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
6802                 </fields>
6803                 <links>
6804                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6805                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
6806                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6807                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6808                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6809                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6810                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6811                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6812                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
6813                 </links>
6814         </class>
6815
6816         <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">
6817                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6818                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6819                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6820                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6821                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6822                 </fields>
6823                 <links/>
6824                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6825                         <actions>
6826                                 <retrieve />
6827                         </actions>
6828                 </permacrud>
6829         </class>
6830
6831         <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">
6832                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6833                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6834                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6835                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6836                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6837                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6838             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6839                 </fields>
6840                 <links/>
6841         <permacrud>
6842             <actions>
6843                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6844                 <retrieve />
6845                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6846                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6847             </actions>
6848         </permacrud>
6849         </class>
6850
6851         <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">
6852                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6853                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6854                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6855                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6856                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6857                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6858                 </fields>
6859                 <links/>
6860         </class>
6861         <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">
6862                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6863                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6864                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6865                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6866                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6867                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6868                 </fields>
6869                 <links>
6870                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6871                 </links>
6872         </class>
6873
6874         <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">
6875             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6876                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6877                 <field reporter:label="Code" name="code" reporter:datatype="text" />
6878                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6879                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6880                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6881                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6882         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6883
6884             </fields>
6885             <links>
6886                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6887             </links>
6888             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6889                 <actions>
6890                     <create permission="ADMIN_PROVIDER">
6891                         <context link="provider" field="owner"/>
6892                     </create>
6893                     <retrieve permission="ADMIN_PROVIDER">
6894                         <context link="provider" field="owner"/>
6895                     </retrieve>
6896                     <update permission="ADMIN_PROVIDER">
6897                         <context link="provider" field="owner"/>
6898                     </update>
6899                     <delete permission="ADMIN_PROVIDER">
6900                         <context link="provider" field="owner"/>
6901                     </delete>
6902                 </actions>
6903             </permacrud>
6904         </class>
6905         
6906         <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">
6907             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
6908                 <field reporter:label="ID" name="id" reporter:datatype="id" />
6909                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6910                 <field reporter:label="Name" name="name" reporter:datatype="text" />
6911                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
6912             </fields>
6913             <links>
6914                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6915             </links>
6916             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6917                 <actions>
6918                     <create permission="ADMIN_PROVIDER">
6919                         <context link="provider" field="owner"/>
6920                     </create>
6921                     <retrieve permission="ADMIN_PROVIDER">
6922                         <context link="provider" field="owner"/>
6923                     </retrieve>
6924                     <update permission="ADMIN_PROVIDER">
6925                         <context link="provider" field="owner"/>
6926                     </update>
6927                     <delete permission="ADMIN_PROVIDER">
6928                         <context link="provider" field="owner"/>
6929                     </delete>
6930                 </actions>
6931             </permacrud>
6932         </class>
6933         
6934         <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">
6935             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6936                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6937                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6938                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6939                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6940                 </fields>
6941                 <links/>
6942         </class>
6943
6944         <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">
6945                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
6946                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
6947                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
6948                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
6949                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
6950                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
6951                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
6952                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
6953                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
6954                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
6955                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
6956                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
6957                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
6958                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
6959                 </fields>
6960                 <links>
6961                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6962                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6963                 </links>
6964         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6965             <actions>
6966                 <create permission="ADMIN_PROVIDER">
6967                     <context link="provider" field="owner"/>
6968                 </create>
6969                 <retrieve permission="ADMIN_PROVIDER">
6970                     <context link="provider" field="owner"/>
6971                 </retrieve>
6972                 <update permission="ADMIN_PROVIDER">
6973                     <context link="provider" field="owner"/>
6974                 </update>
6975                 <delete permission="ADMIN_PROVIDER">
6976                     <context link="provider" field="owner"/>
6977                 </delete>
6978             </actions>
6979         </permacrud>
6980         </class>
6981
6982         <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">
6983                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
6984                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
6985                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
6986                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
6987                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
6988                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
6989                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
6990                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
6991                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
6992                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
6993                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
6994                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
6995                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
6996                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
6997                 </fields>
6998                 <links>
6999                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
7000                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7001                 </links>
7002         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7003             <actions>
7004                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7005                     <context link="account" jump="provider" field="owner"/>
7006                 </retrieve>
7007                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7008                     <context link="account" jump="provider" field="owner"/>
7009                 </update>
7010                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7011                     <context link="account" jump="provider" field="owner"/>
7012                 </delete>
7013             </actions>
7014         </permacrud>
7015         </class>
7016
7017
7018         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
7019                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
7020                         <field name="id" reporter:datatype="id" />
7021                         <field name="parent" reporter:datatype="link"/>
7022                         <field name="owner" reporter:datatype="link"/>
7023                         <field name="create_time" reporter:datatype="timestamp"/>
7024                         <field name="name" reporter:datatype="text"/>
7025                         <field name="shared" reporter:datatype="bool"/>
7026                         <field name="share_with" reporter:datatype="link"/>
7027                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7028                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7029                 </fields>
7030                 <links>
7031                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7032                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7033                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7034                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7035                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7036                 </links>
7037         </class>
7038         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7039                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7040                         <field name="id" reporter:datatype="id" />
7041                         <field name="parent" reporter:datatype="link"/>
7042                         <field name="owner" reporter:datatype="link"/>
7043                         <field name="create_time" reporter:datatype="timestamp"/>
7044                         <field name="name" reporter:datatype="text"/>
7045                         <field name="shared" reporter:datatype="bool"/>
7046                         <field name="share_with" reporter:datatype="link"/>
7047                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7048                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7049                 </fields>
7050                 <links>
7051                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7052                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7053                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7054                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7055                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7056                 </links>
7057         </class>
7058         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7059                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7060                         <field name="id" reporter:datatype="id" />
7061                         <field name="parent" reporter:datatype="link"/>
7062                         <field name="owner" reporter:datatype="link"/>
7063                         <field name="create_time" reporter:datatype="timestamp"/>
7064                         <field name="name" reporter:datatype="text"/>
7065                         <field name="shared" reporter:datatype="bool"/>
7066                         <field name="share_with" reporter:datatype="link"/>
7067                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7068                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7069                 </fields>
7070                 <links>
7071                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7072                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7073                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7074                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7075                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7076                 </links>
7077         </class>
7078         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7079                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7080                         <field name="id" reporter:datatype="id" />
7081                         <field name="owner" reporter:datatype="link"/>
7082                         <field name="create_time" reporter:datatype="timestamp"/>
7083                         <field name="name" reporter:datatype="text"/>
7084                         <field name="data" reporter:datatype="text"/>
7085                         <field name="folder" reporter:datatype="link"/>
7086                         <field name="description" reporter:datatype="text"/>
7087                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7088                 </fields>
7089                 <links>
7090                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7091                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7092                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7093                 </links>
7094         </class>
7095         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7096                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7097                         <field name="id" reporter:datatype="id" />
7098                         <field name="owner" reporter:datatype="link"/>
7099                         <field name="create_time" reporter:datatype="timestamp"/>
7100                         <field name="template" reporter:datatype="link"/>
7101                         <field name="data" reporter:datatype="text"/>
7102                         <field name="folder" reporter:datatype="link"/>
7103                         <field name="recur" reporter:datatype="bool"/>
7104                         <field name="recurrence" reporter:datatype="interval"/>
7105                         <field name="name" reporter:datatype="text"/>
7106                         <field name="description" reporter:datatype="text"/>
7107                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7108                 </fields>
7109                 <links>
7110                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7111                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7112                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7113                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7114                 </links>
7115         </class>
7116         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7117                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7118                         <field name="id" reporter:datatype="id" />
7119                         <field name="runner" reporter:datatype="link"/>
7120                         <field name="start_time" reporter:datatype="timestamp"/>
7121                         <field name="complete_time" reporter:datatype="timestamp"/>
7122                         <field name="run_time" reporter:datatype="timestamp"/>
7123                         <field name="email" reporter:datatype="text"/>
7124                         <field name="excel_format" reporter:datatype="bool"/>
7125                         <field name="csv_format" reporter:datatype="bool"/>
7126                         <field name="html_format" reporter:datatype="bool"/>
7127                         <field name="error_code" reporter:datatype="int"/>
7128                         <field name="error_text" reporter:datatype="text"/>
7129                         <field name="report" reporter:datatype="link"/>
7130                         <field name="folder" reporter:datatype="link"/>
7131                         <field name="chart_pie" reporter:datatype="bool"/>
7132                         <field name="chart_bar" reporter:datatype="bool"/>
7133                         <field name="chart_line" reporter:datatype="bool"/>
7134                 </fields>
7135                 <links>
7136                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7137                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7138                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7139                 </links>
7140         </class>
7141         <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">
7142                 <fields oils_persist:primary="id">
7143                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7144                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7145                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7146                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7147                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7148                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7149                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7150                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7151                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7152                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7153                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7154                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7155                 </fields>
7156                 <links>
7157                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7158                 </links>
7159         </class>
7160         <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">
7161                 <fields oils_persist:primary="id">
7162                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7163                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7164                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7165                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7166                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7167                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7168                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7169                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7170                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7171                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7172                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7173                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7174                 </fields>
7175                 <links>
7176                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7177                 </links>
7178         </class>
7179         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7180                 <fields oils_persist:primary="id">
7181                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7182                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7183                         <field reporter:label="Fingerprint" name="fingerprint" />
7184                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7185                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7186                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7187                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7188                         <field reporter:label="Uniform Title (normalized)" name="uniform_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="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7193                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7194                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7195                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7196                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7197                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7198                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7199                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7200                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7201                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7202                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7203                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7204                 </fields>
7205                 <links>
7206                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7207                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7208                 </links>
7209         </class>
7210         <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">
7211                 <fields oils_persist:primary="id">
7212                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7213                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7214                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7215                 </fields>
7216                 <links>
7217                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7218                 </links>
7219         </class>
7220         <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">
7221                 <fields oils_persist:primary="id">
7222                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7223                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7224                 </fields>
7225                 <links>
7226                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7227                 </links>
7228         </class>
7229         <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">
7230                 <fields oils_persist:primary="id">
7231                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7232                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7233                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7234                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7235                 </fields>
7236                 <links>
7237                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7238                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7239                 </links>
7240         </class>
7241         <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">
7242                 <fields oils_persist:primary="xact">
7243                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7244                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7245                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7246                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7247                 </fields>
7248                 <links>
7249                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7250                 </links>
7251         </class>
7252         <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">
7253                 <fields oils_persist:primary="xact">
7254                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7255                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7256                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7257                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7258                 </fields>
7259                 <links>
7260                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7261                 </links>
7262         </class>
7263         <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)">
7264                 <fields oils_persist:primary="id">
7265                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7266                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7267                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7268                 </fields>
7269                 <links>
7270                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7271                 </links>
7272         </class>
7273         <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">
7274                 <fields oils_persist:primary="id">
7275                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7276                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7277                 </fields>
7278                 <links>
7279                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7280                 </links>
7281         </class>
7282         <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">
7283                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7284                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7285                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7286                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7287                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7288                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7289                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7290                 </fields>
7291                 <links>
7292                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7293                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7294                 </links>
7295                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7296                         <actions>
7297                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7298                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7299                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7300                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7301                         </actions>
7302                 </permacrud>
7303         </class>
7304         <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">
7305                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7306                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7307                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7308                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7309                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7310                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7311                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7312                 </fields>
7313                 <links>
7314                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7315                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7316                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7317                 </links>
7318                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7319                         <actions>
7320                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7321                                         <context link="formula" field="owner"/>
7322                                 </create>
7323                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7324                                         <context link="formula" field="owner"/>
7325                                 </retrieve>
7326                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7327                                         <context link="formula" field="owner"/>
7328                                 </update>
7329                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7330                                         <context link="formula" field="owner"/>
7331                                 </delete>
7332                         </actions>
7333                 </permacrud>
7334         </class>
7335
7336         <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">
7337                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7338                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7339                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7340                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7341                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7342                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7343                 </fields>
7344                 <links>
7345                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7346                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7347                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7348                 </links>
7349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7350                         <actions>
7351                                 <create permission="CREATE_PURCHASE_ORDER">
7352                                         <context link="formula" field="owner"/>
7353                 </create>
7354                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7355                                         <context link="formula" field="owner"/>
7356                 </retrieve>
7357                                 <update permission="CREATE_PURCHASE_ORDER">
7358                                         <context link="formula" field="owner"/>
7359                 </update>
7360                                 <delete permission="CREATE_PURCHASE_ORDER">
7361                                         <context link="formula" field="owner"/>
7362                 </delete>
7363                         </actions>
7364                 </permacrud>
7365         </class>
7366
7367         <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">
7368                 <fields oils_persist:primary="id">
7369                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7370                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7371                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7372                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7373                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7374                 </fields>
7375                 <links>
7376                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7377                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7378                 </links>
7379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7380                 </permacrud>
7381         </class>
7382
7383         <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">
7384                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7385                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7386                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7387                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7388                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7389                 </fields>
7390                 <links>
7391                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7392                 </links>
7393                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7394                         <actions>
7395                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7396                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7397                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7398                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7399                         </actions>
7400                 </permacrud>
7401         </class>
7402
7403         <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">
7404                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7405                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7406                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7407                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7408                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7409                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
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_EVENT_TYPE" context_field="org_unit"/>
7417                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7418                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7419                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7420                         </actions>
7421                 </permacrud>
7422         </class>
7423
7424         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7425                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7426                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7427                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7428                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7429                 </fields>
7430                 <links>
7431                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7432                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7433                 </links>
7434                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7435                 </permacrud>
7436         </class>
7437
7438         <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">
7439                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7440                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7441                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7442                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7443                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7444                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7445                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7446                 </fields>
7447                 <links>
7448                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7449                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7450                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7451                 </links>
7452                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7453                 </permacrud>
7454         </class>
7455
7456         <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">
7457                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7458                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7459                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7460                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7461                 </fields>
7462                 <links>
7463                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7464                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7465                 </links>
7466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7467                 </permacrud>
7468         </class>
7469
7470         <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">
7471                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7472                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7473                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7474                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7475                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7476                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7477                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7478                 </fields>
7479                 <links>
7480                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7481                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7482                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7483                 </links>
7484                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7485                 </permacrud>
7486         </class>
7487
7488         <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">
7489                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7490                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7491                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7492                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7493                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7494                 </fields>
7495                 <links>
7496                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7497                 </links>
7498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7499             <actions>
7500                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7501                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
7502                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7503                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7504             </actions>
7505                 </permacrud>
7506         </class>
7507
7508         <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">
7509                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
7510                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
7511                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
7512                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
7513                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
7514                 </fields>
7515                 <links>
7516                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7517                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
7518                 </links>
7519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7520                         <actions>
7521                                 <create permission="ADMIN_CLAIM_POLICY">
7522                                         <context link="claim_policy" field="org_unit"/>
7523                 </create>
7524                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
7525                                         <context link="claim_policy" field="org_unit"/>
7526                 </retrieve>
7527                                 <update permission="ADMIN_CLAIM_POLICY">
7528                                         <context link="claim_policy" field="org_unit"/>
7529                 </update>
7530                                 <delete permission="ADMIN_CLAIM_POLICY">
7531                                         <context link="claim_policy" field="org_unit"/>
7532                 </delete>
7533                         </actions>
7534                 </permacrud>
7535         </class>
7536
7537     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
7538         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
7539             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7540             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7541             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7542             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
7543             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7544             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
7545             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
7546             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
7547             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
7548             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
7549             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
7550             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
7551             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
7552             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
7553             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7554         </fields>
7555     </class>
7556
7557     <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">
7558         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
7559             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7560             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7561             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7562             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7563             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7564         </fields>
7565     </class>
7566
7567     <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">
7568         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
7569             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7570             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7571             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7572             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7573             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7574             <field reporter:label="City" name="city" reporter:datatype="text"/>
7575             <field reporter:label="State" name="state" reporter:datatype="text"/>
7576             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7577             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7578             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7579         </fields>
7580     </class>
7581
7582     <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">
7583         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
7584             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7585             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7586             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7587             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7588             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7589             <field reporter:label="City" name="city" reporter:datatype="text"/>
7590             <field reporter:label="State" name="state" reporter:datatype="text"/>
7591             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7592             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7593             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7594         </fields>
7595     </class>
7596
7597     <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">
7598         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
7599             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7600             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7601             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7602             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
7603             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
7604             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7605         </fields>
7606     </class>
7607
7608         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
7609                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
7610                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
7611                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7612                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7613                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
7614                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
7615                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
7616                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
7617                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
7618                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
7619                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
7620                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
7621                 </fields>
7622                 <links>
7623                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7624                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7625                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7626                 </links>
7627                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7628                 </permacrud>
7629         </class>
7630
7631         <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">
7632                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
7633                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
7634                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
7635                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
7636                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
7637                 </fields>
7638                 <links>
7639                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
7640                 </links>
7641                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7642                 </permacrud>
7643         </class>
7644
7645     <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">
7646         <fields>
7647             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7648             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7649             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7650         </fields>
7651                 <links>
7652                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7653                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7654                 </links>
7655     </class>
7656
7657     <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">
7658         <fields>
7659             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7660             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
7661         </fields>
7662                 <links>
7663                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7664                 </links>
7665     </class>
7666
7667     <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">
7668         <fields>
7669             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7670             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7671             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7672         </fields>
7673                 <links>
7674                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7675                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7676                 </links>
7677     </class>
7678
7679     <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">
7680         <fields>
7681             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7682             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
7683         </fields>
7684                 <links>
7685                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7686                 </links>
7687     </class>
7688
7689     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
7690                 <oils_persist:source_definition>
7691
7692             SELECT  DISTINCT l.*
7693               FROM  action.unfulfilled_hold_loops l
7694                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
7695               WHERE l.count = m.max
7696
7697                 </oils_persist:source_definition>
7698         <fields>
7699             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7700             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7701             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7702         </fields>
7703                 <links>
7704                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7705                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7706                 </links>
7707     </class>
7708
7709         <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">
7710                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
7711                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
7712                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
7713                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
7714                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
7715                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
7716                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
7717                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
7718                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
7719                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
7720                 </fields>
7721                 <links>
7722                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
7723                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
7724                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
7725                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
7726                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
7727                 </links>
7728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7729                 </permacrud>
7730         </class>
7731
7732         <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">
7733                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
7734                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
7735                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
7736                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7737                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
7738                 </fields>
7739                 <links>
7740                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
7741                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
7742                 </links>
7743                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7744                 </permacrud>
7745         </class>
7746
7747         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
7748                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
7749                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
7750                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
7751                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
7752                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
7753                 </fields>
7754                 <links>
7755                 </links>
7756                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7757                 </permacrud>
7758         </class>
7759
7760         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
7761                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
7762                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
7763                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
7764                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7765                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
7766                 </fields>
7767                 <links>
7768                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
7769                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
7770                 </links>
7771                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7772                 </permacrud>
7773         </class>
7774         
7775         <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">
7776                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
7777                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
7778                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
7779                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
7780                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
7781                 </fields>
7782                 <links>
7783                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
7784                 </links>
7785                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7786                 </permacrud>
7787         </class>
7788         
7789         <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">
7790                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
7791                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
7792                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7793                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7794                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
7795                 </fields>
7796                 <links>
7797                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7798                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
7799                 </links>
7800                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7801                 </permacrud>
7802         </class>
7803
7804         <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">
7805                 <fields oils_persist:primary="name">
7806                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
7807                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7808                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
7809                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7810                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
7811                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
7812                 </fields>
7813                 <links>
7814                 </links>
7815                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7816                 </permacrud>
7817         </class>
7818
7819         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
7820                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7821                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7822                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
7823                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7824                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7825                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7826                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7827                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7828                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7829                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7830                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7831                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
7832                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7833                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7834                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7835                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7836                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7837                 </fields>
7838                 <links>
7839                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7840                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7841                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
7842                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7843                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7844                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7845                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7846                 </links>
7847                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7848                 </permacrud>
7849         </class>
7850
7851         <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">
7852                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
7853                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
7854                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7855                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7856                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
7857                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
7858                 </fields>
7859                 <links>
7860                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7861                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
7862                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
7863                 </links>
7864                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7865                 </permacrud>
7866         </class>
7867
7868         <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">
7869                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
7870                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
7871                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
7872                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
7873                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
7874                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
7875                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
7876                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7877                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
7878                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7879                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
7880                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
7881                 </fields>
7882                 <links>
7883                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7884                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
7885                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
7886                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
7887                 </links>
7888                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7889                 </permacrud>
7890         </class>
7891
7892         <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">
7893                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
7894                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
7895                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
7896                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7897                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7898                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
7899                 </fields>
7900                 <links>
7901                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
7902                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
7903                 </links>
7904                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7905                 </permacrud>
7906         </class>
7907
7908         <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">
7909                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
7910                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
7911                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7912                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7913                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7914                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
7915                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
7916                 </fields>
7917                 <links>
7918                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7919                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7920                 </links>
7921                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7922                 </permacrud>
7923         </class>
7924
7925         <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">
7926                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
7927                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
7928                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7929                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7930                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7931                 </fields>
7932                 <links>
7933                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7934                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7935                 </links>
7936                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7937                 </permacrud>
7938         </class>
7939
7940         <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">
7941                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7942                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7943                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7944                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7945                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7946                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7947                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7948                 </fields>
7949                 <links>
7950                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7951                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7952                 </links>
7953                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7954                 </permacrud>
7955         </class>
7956
7957         <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">
7958                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7959                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7960                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7961                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7962                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7963                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7964                 </fields>
7965                 <links>
7966                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7967                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7968                 </links>
7969                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7970                 </permacrud>
7971         </class>
7972
7973         <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">
7974                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7975                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7976                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7977                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7978                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7979                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7980                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7981                 </fields>
7982                 <links>
7983                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7984                 </links>
7985                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7986                 </permacrud>
7987         </class>
7988
7989         <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">
7990                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7991                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7992                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7993                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7994                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7995                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7996                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7997                 </fields>
7998                 <links>
7999                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8000                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8001                 </links>
8002                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8003                 </permacrud>
8004         </class>
8005
8006         <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">
8007                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8008                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8009                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8010                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8011                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8012                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8013                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8014                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8015                 </fields>
8016                 <links>
8017                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8018                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8019                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8020                 </links>
8021                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8022                 </permacrud>
8023         </class>
8024
8025         <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">
8026                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8027                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8028                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8029                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8030                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8031                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8032                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8033                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8034                 </fields>
8035                 <links>
8036                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8037                 </links>
8038                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8039                 </permacrud>
8040         </class>
8041
8042         <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">
8043                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8044                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8045                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8046                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8047                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8048                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8049                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8050                 </fields>
8051                 <links>
8052                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8053                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8054                 </links>
8055                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8056                 </permacrud>
8057         </class>
8058
8059         <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">
8060                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8061                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8062                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8063                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8064                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8065                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8066                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8067                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8068                 </fields>
8069                 <links>
8070                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8071                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8072                 </links>
8073                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8074                 </permacrud>
8075         </class>
8076
8077         <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">
8078                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8079                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8080                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8081                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8082                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8083                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8084                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8085                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8086                 </fields>
8087                 <links>
8088                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8089                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8090                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8091                 </links>
8092                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8093                 </permacrud>
8094         </class>
8095
8096         <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">
8097                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8098                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8099                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8100                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8101                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8102                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8103                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8104                 </fields>
8105                 <links>
8106                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8107                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8108                 </links>
8109                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8110                 </permacrud>
8111         </class>
8112
8113         <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">
8114                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8115                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8116                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8117                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8118                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8119                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8120                 </fields>
8121                 <links>
8122                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8123                 </links>
8124                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8125                 </permacrud>
8126         </class>
8127
8128         <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">
8129                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8130                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8131                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8132                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8133                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8134                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8135                 </fields>
8136                 <links>
8137                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8138                 </links>
8139                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8140                 </permacrud>
8141         </class>
8142
8143         <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">
8144                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8145                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8146                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8147                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8148                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8149                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8150                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8151                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8152                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8153                 </fields>
8154                 <links>
8155                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8156                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8157                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8158                 </links>
8159                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8160                 </permacrud>
8161         </class>
8162
8163         <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">
8164                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8165                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8166                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8167                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8168                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8169                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8170                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8171                 </fields>
8172                 <links>
8173                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8174                 </links>
8175                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8176                 </permacrud>
8177         </class>
8178
8179         <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">
8180                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8181                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8182                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8183                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8184                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8185                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8186                 </fields>
8187                 <links>
8188                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8189                 </links>
8190                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8191                 </permacrud>
8192         </class>
8193
8194         <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">
8195                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8196                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8197                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8198                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8199                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8200                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8201                 </fields>
8202                 <links>
8203                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8204                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8205                 </links>
8206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8207                 </permacrud>
8208         </class>
8209
8210         <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">
8211                 <fields oils_persist:primary="id">
8212                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8213                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8214                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8215                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8216                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8217                 </fields>
8218                 <links>
8219                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8220                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8221                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8222                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8223                 </links>
8224         </class>
8225
8226         <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">
8227                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8228                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8229                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8230                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8231                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8232                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8233                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8234                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8235                 </fields>
8236                 <links/>
8237                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8238                         <actions>
8239                                 <retrieve/>
8240                         </actions>
8241                 </permacrud>
8242         </class>
8243
8244         <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">
8245                 <fields oils_persist:primary="ptype_key">
8246                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8247                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8248                 </fields>
8249                 <links/>
8250                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8251                         <actions>
8252                                 <retrieve/>
8253                         </actions>
8254                 </permacrud>
8255         </class>
8256
8257         <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">
8258                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8259                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8260                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8261                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8262                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8263                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8264                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8265                 </fields>
8266                 <links>
8267                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8268                 </links>
8269                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8270                         <actions>
8271                                 <retrieve/>
8272                         </actions>
8273                 </permacrud>
8274         </class>
8275
8276         <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">
8277                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8278                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8279                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8280                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8281                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8282                 </fields>
8283                 <links>
8284                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8285                 </links>
8286                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8287                         <actions>
8288                                 <retrieve/>
8289                         </actions>
8290                 </permacrud>
8291         </class>
8292
8293         <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">
8294                 <fields oils_persist:primary="code">
8295                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8296                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8297                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8298                 </fields>
8299                 <links/>
8300                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8301                         <actions>
8302                                 <retrieve/>
8303                         </actions>
8304                 </permacrud>
8305         </class>
8306
8307         <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">
8308                 <oils_persist:source_definition>
8309
8310             SELECT  b.id,
8311                     MAX(dcp.edit_date) AS last_delete_date
8312              FROM   biblio.record_entry b
8313                     JOIN asset.call_number cn ON (cn.record = b.id)
8314                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8315              WHERE  NOT b.deleted
8316              GROUP BY b.id
8317              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8318
8319                 </oils_persist:source_definition>
8320                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8321                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8322                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8323                 </fields>
8324                 <links>
8325                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8326                 </links>
8327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8328                         <actions>
8329                                 <retrieve/>
8330                         </actions>
8331                 </permacrud>
8332         </class>
8333
8334         <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">
8335                 <oils_persist:source_definition>
8336
8337             -- -- 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.
8338             -- -- 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
8339             -- -- may not.
8340             -- SELECT
8341             --     bre.id AS "bib_id",
8342             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8343             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8344             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8345             -- FROM (
8346                 SELECT
8347                     y.bre AS "id",
8348                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8349                     y.hold_count AS "hold_count",
8350                     (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"
8351                 FROM (
8352                         SELECT
8353                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8354                             COUNT(*) AS "hold_count"
8355                         FROM action.hold_request h
8356                         WHERE
8357                             cancel_time IS NULL
8358                             AND fulfillment_time IS NULL
8359                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8360                         GROUP BY 1
8361                     )y LEFT JOIN (
8362                         SELECT 
8363                             (SELECT id
8364                                 FROM biblio.record_entry 
8365                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8366                             ) AS "bre", 
8367                             COUNT(*) AS "copy_count"
8368                         FROM asset.copy
8369                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8370                         WHERE copy.holdable 
8371                             AND NOT copy.deleted 
8372                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8373                         GROUP BY 1
8374                     )x ON x.bre = y.bre
8375                 -- )z RIGHT JOIN (
8376                 --     SELECT id
8377                 --     FROM biblio.record_entry
8378                 --     WHERE NOT deleted
8379                 -- )bre ON (z.bib_id = bre.id)
8380                 
8381
8382                 </oils_persist:source_definition>
8383                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8384                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8385                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8386                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8387                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8388                 </fields>
8389                 <links>
8390                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8391                 </links>
8392                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8393                         <actions>
8394                                 <retrieve/>
8395                         </actions>
8396                 </permacrud>
8397         </class>
8398
8399         <!-- ********************************************************************************************************************* -->
8400         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8401         <!-- ********************************************************************************************************************* -->
8402         <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">
8403                 <fields oils_persist:primary="id">
8404                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8405                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8406                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8407                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8408                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8409                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8410                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8411                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8412                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8413                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8414                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8415                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8416                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8417                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8418                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8419                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8420                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8421                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8422                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8423                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8424                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8425                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8426                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8427                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8428                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8429                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8430                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8431                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8432                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8433                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8434                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8435                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8436                 </fields>
8437                 <links>
8438                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8439                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8440                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8441                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8442                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8443                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8444                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8445                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8446                 </links>
8447         </class>
8448
8449         <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">
8450                 <fields oils_persist:primary="id">
8451                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8452                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8453                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8454                 </fields>
8455                 <links>
8456                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8457                 </links>
8458         </class>
8459
8460         <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">
8461                 <fields oils_persist:primary="id">
8462                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8463                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8464                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8465                 </fields>
8466                 <links>
8467                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8468                 </links>
8469         </class>
8470
8471         <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">
8472                 <fields oils_persist:primary="id">
8473                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8474
8475                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
8476                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
8477                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
8478
8479                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
8480                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
8481                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
8482
8483                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
8484                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
8485
8486                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8487                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
8488                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
8489
8490                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
8491                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
8492
8493                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
8494                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
8495                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
8496
8497                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
8498                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
8499                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
8500
8501                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8502                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
8503                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
8504                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
8505
8506                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
8507                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
8508
8509                 </fields>
8510                 <links>
8511                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
8512                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8513                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
8514                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
8515                 </links>
8516         </class>
8517
8518         <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">
8519                 <oils_persist:source_definition>
8520
8521             SELECT
8522                 po.ordering_agency AS ordering_agency,
8523                 po.id AS purchase_order,
8524                 li.id AS lineitem,
8525                 lid.id AS lineitem_detail,
8526                 cpa.id AS claim_policy_action
8527             FROM
8528                 acq.lineitem_detail lid
8529                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
8530                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
8531                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
8532                 JOIN acq.claim_policy_action cpa ON (
8533                     cpa.claim_policy = cp.id
8534
8535                     -- we only care about claim policy actions whose claim
8536                     -- interval we'd reached or exceeded
8537                     AND (NOW() - cpa.action_interval) &gt; po.order_date
8538
8539                     -- filter out all claim policy actions where claim events
8540                     -- have occurred on or after the action's action_interval
8541                     AND NOT EXISTS (
8542                         SELECT 1
8543                         FROM
8544                             acq.claim_event evt
8545                             JOIN acq.claim claim ON (
8546                                 claim.id = evt.claim
8547                                 AND claim.lineitem_detail = lid.id
8548                             )
8549                         WHERE
8550                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
8551                     )
8552                 )
8553             WHERE
8554                 lid.cancel_reason IS NULL
8555                 AND li.cancel_reason IS NULL -- belt/suspenders
8556                 AND po.cancel_reason IS NULL -- belt/suspenders
8557                 AND lid.recv_time IS NULL
8558                 AND po.state = 'on-order'
8559             ORDER BY 1, 2, 3, 4, 5
8560
8561                 </oils_persist:source_definition>
8562                 <fields>
8563                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8564                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8565                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8566                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8567                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
8568                 </fields>
8569                 <links>
8570                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8571                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8572                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8573                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8574                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
8575                 </links>
8576         </class>
8577
8578         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
8579                 <oils_persist:source_definition>
8580
8581             SELECT 
8582                 li.id AS lineitem, 
8583                 (
8584                     SELECT COUNT(lid.id) 
8585                     FROM acq.lineitem_detail lid
8586                     WHERE lineitem = li.id
8587                 ) AS item_count,
8588                 (
8589                     SELECT COUNT(lid.id) 
8590                     FROM acq.lineitem_detail lid
8591                     WHERE recv_time IS NOT NULL AND lineitem = li.id
8592                 ) AS recv_count,
8593                 (
8594                     SELECT COUNT(lid.id) 
8595                     FROM acq.lineitem_detail lid
8596                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
8597                 ) AS cancel_count,
8598                 (
8599                     SELECT COUNT(lid.id) 
8600                     FROM acq.lineitem_detail lid
8601                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8602                     WHERE NOT debit.encumbrance AND lineitem = li.id
8603                 ) AS invoice_count,
8604                 (
8605                     SELECT COUNT(DISTINCT(lid.id)) 
8606                     FROM acq.lineitem_detail lid
8607                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
8608                     WHERE lineitem = li.id
8609                 ) AS claim_count,
8610                 (
8611                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
8612                     FROM acq.lineitem_detail lid
8613                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
8614                 ) AS estimated_amount,
8615                 (
8616                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8617                     FROM acq.lineitem_detail lid
8618                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8619                     WHERE debit.encumbrance AND lineitem = li.id
8620                 ) AS encumbrance_amount,
8621                 (
8622                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8623                     FROM acq.lineitem_detail lid
8624                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8625                     WHERE NOT debit.encumbrance AND lineitem = li.id
8626                 ) AS paid_amount
8627
8628                 FROM acq.lineitem AS li
8629         </oils_persist:source_definition>
8630                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
8631                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8632                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8633                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
8634                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
8635                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
8636                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
8637                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
8638                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
8639                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
8640                 </fields>
8641                 <links>
8642                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8643                 </links>
8644     </class>
8645
8646
8647         <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">
8648                 <oils_persist:source_definition>
8649
8650                         SELECT  t.*
8651                           FROM  action.transit_copy t
8652                                 JOIN actor.org_unit AS s ON (t.source = s.id)
8653                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
8654                           WHERE s.parent_ou &lt;&gt; d.parent_ou
8655
8656                 </oils_persist:source_definition>
8657                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8658                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
8659                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
8660                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8661                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
8662                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
8663                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
8664                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
8665                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8666                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8667                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8668                 </fields>
8669                 <links>
8670                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
8671                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8672                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8673                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8674                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8675                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
8676                 </links>
8677         </class>
8678
8679     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
8680                 <oils_persist:source_definition>
8681
8682         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
8683                 SELECT
8684                         cp.id as copy,
8685                         COUNT(circ.id),
8686                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8687                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8688                 FROM
8689                         asset.copy cp
8690                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
8691                 GROUP BY 1, 3, 4
8692                 UNION
8693                 SELECT
8694                         cp.id as copy,
8695                         COUNT(circ.id),
8696                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8697                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8698                 FROM
8699                         asset.copy cp
8700                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
8701                 GROUP BY 1, 3, 4
8702                 UNION
8703                 SELECT
8704                         id as copy,
8705                         circ_count,
8706                         -1 AS year,
8707                         false as is_renewal
8708                 FROM
8709                         extend_reporter.legacy_circ_count
8710         )x GROUP BY 1, 3, 4
8711
8712                 </oils_persist:source_definition>
8713         <fields>
8714             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
8715             <field reporter:label="Count" name="count" reporter:datatype="int"/>
8716             <field reporter:label="Year" name="year" reporter:datatype="int"/>
8717             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
8718         </fields>
8719                 <links>
8720                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8721                 </links>
8722                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8723                         <actions>
8724                                 <retrieve/>
8725                         </actions>
8726                 </permacrud>
8727     </class>
8728
8729         <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">
8730                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
8731                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
8732                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
8733                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
8734                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8735                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
8736                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
8737                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
8738                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
8739                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
8740                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
8741                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
8742                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
8743                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
8744                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
8745                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
8746                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
8747                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
8748                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
8749                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
8750                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
8751                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
8752                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
8753                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
8754                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
8755                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
8756                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
8757                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
8758                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
8759                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
8760                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
8761                 </fields>
8762                 <links>
8763                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
8764                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
8765                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
8766                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8767                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
8768                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8769                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8770                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
8771                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
8772                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
8773                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
8774                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
8775                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
8776                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
8777                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
8778                 </links>
8779         </class>
8780
8781     <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">
8782         <fields oils_persist:primary="id">
8783             <field reporter:label="Title" name="title" reporter:datatype="text"/>
8784             <field reporter:label="Author" name="author" reporter:datatype="text"/>
8785             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
8786             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
8787             <field reporter:label="Price" name="price" reporter:datatype="money"/>
8788             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8789             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
8790             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
8791             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8792             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
8793             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8794             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
8795             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
8796             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
8797             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8798             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8799             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8800             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8801             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
8802             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
8803             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
8804             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
8805             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8806             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
8807             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
8808             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
8809             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
8810             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
8811             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
8812             <field reporter:label="Status" name="status" reporter:datatype="link"/>
8813             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
8814             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
8815             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
8816             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
8817         </fields>
8818         <links>
8819             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8820             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8821             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8822             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8823             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8824         </links>
8825     </class>
8826
8827     <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">
8828         <fields oils_persist:primary="id">
8829             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8830             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8831             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8832             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8833         </fields>
8834         <links>
8835             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8836             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8837         </links>
8838     </class>
8839
8840     <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">
8841         <fields oils_persist:primary="owning_lib">
8842             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8843             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8844             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8845         </fields>
8846         <links>
8847             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8848         </links>
8849     </class>
8850
8851     <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">
8852         <fields oils_persist:primary="id">
8853             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8854             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8855             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8856             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8857             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8858         </fields>
8859         <links>
8860             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8861             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8862             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8863         </links>
8864     </class>
8865
8866     <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">
8867         <fields oils_persist:primary="circ_lib">
8868             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8869             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8870             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8871             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8872         </fields>
8873         <links>
8874             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8875             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8876         </links>
8877     </class>
8878
8879     <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">
8880         <fields oils_persist:primary="id">
8881             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8882             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8883             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8884             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8885             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8886         </fields>
8887         <links>
8888             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8889             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8890             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8891         </links>
8892     </class>
8893
8894     <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">
8895         <fields oils_persist:primary="home_ou">
8896             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8897             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8898             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8899             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8900         </fields>
8901         <links>
8902             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8903             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8904         </links>
8905     </class>
8906         <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">
8907                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
8908                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
8909                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
8910                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
8911                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
8912                 </fields>
8913                 <links>
8914                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8915                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
8916                 </links>
8917                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8918                         <actions>
8919                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8920                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
8921                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8922                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8923                         </actions>
8924                 </permacrud>
8925         </class>
8926         <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">
8927                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
8928                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
8929                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
8930                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
8931                 </fields>
8932                 <links>
8933                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8934                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
8935                         </links>
8936                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8937                 <actions>
8938                                 <create permission="ADMIN_ACQ_FUND_TAG">
8939                                         <context link="tag" field="owner"/>
8940                                 </create>
8941                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8942                                         <context link="tag" field="owner"/>
8943                                 </retrieve>
8944                                 <update permission="ADMIN_ACQ_FUND_TAG">
8945                                         <context link="tag" field="owner"/>
8946                                 </update>
8947                                 <delete permission="ADMIN_ACQ_FUND_TAG">
8948                                         <context link="tag" field="owner"/>
8949                                 </delete>
8950                         </actions>
8951                 </permacrud>
8952         </class>
8953         <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">
8954                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
8955                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8956                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
8957                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
8958                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
8959                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
8960                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8961                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
8962                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
8963                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
8964                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
8965                 </fields>
8966                 <links>
8967                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8968                 </links>
8969                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8970                         <actions>
8971                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
8972                                 <retrieve/>
8973                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
8974                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
8975                         </actions>
8976                 </permacrud>
8977         </class>
8978
8979         <!-- ********************************************************************************************************************* -->
8980
8981 </IDL>
8982
8983 <!--
8984     vim:noet:ts=4:sw=4:
8985 -->