]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
crad uses 'name' as its pkey
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 -->
23
24 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                 </fields>
88         </class>
89
90         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
91                 <fields>
92                         <field name="err_msg" oils_persist:virtual="true" />
93                         <field name="type" oils_persist:virtual="true" />
94                 </fields>
95         </class>
96
97         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
98                 <fields>
99                         <field name="err_msg" oils_persist:virtual="true" />
100                         <field name="type" oils_persist:virtual="true" />
101                 </fields>
102         </class>
103
104         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
105                 <fields oils_persist:primary="matchpoint">
106                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
107                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
108                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
109                 </fields>
110                 <links>
111                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
112                 </links>
113         </class>
114
115         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
116         <!-- when the time is right, turn me into a view.  -->
117                 <fields>
118             <field reporter:label="Total Circs" name="num_circs" datatype="int"/>
119             <field reporter:label="Start Time" name="start_time" datatype="timestamp"/>
120             <field reporter:label="Checkout Workstation" name="checkout_workstation" datatype="text"/>
121             <field reporter:label="Last Renewal Time" name="last_renewal_time" datatype="timestamp"/>
122             <field reporter:label="Last Stop Fines" name="last_stop_fines" datatype="text"/>
123             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" datatype="timestamp"/>
124             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" datatype="text"/>
125             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" datatype="text"/>
126             <field reporter:label="Last Checkin Time" name="last_checkin_time" datatype="timestamp"/>
127             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" datatype="timestamp"/>
128                 </fields>
129         </class>
130
131         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
132                 <fields>
133                         <field name="public_name" oils_persist:virtual="true" />
134                         <field name="target_url" oils_persist:virtual="true" />
135                         <field name="target_coverage" oils_persist:virtual="true" />
136                         <field name="target_embargo" oils_persist:virtual="true" />
137                 </fields>
138         </class>
139
140         <!-- Actually in the DB -->
141         <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">
142                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
143                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
144                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
145                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
146                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
147                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
148                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
149                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
150                 </fields>
151                 <links>
152                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
153                 </links>
154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
155                         <actions>
156                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
157                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
158                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
159                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
160                         </actions>
161                 </permacrud>
162         </class>
163
164         <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">
165                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
166                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
167                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
168                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
169                 </fields>
170                 <links>
171                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
172                 </links>
173                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
174                         <actions>
175                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
176                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
177                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
178                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
179                         </actions>
180                 </permacrud>
181         </class>
182
183         <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">
184                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
185                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
186                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
187                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
188                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
189                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
190                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
191                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
192                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
193                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
194                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
195                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
196                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
197                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
198                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
199                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
200                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
201                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
202                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
203                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
204                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
205                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
206                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
207                 </fields>
208                 <links>
209                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
210                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
211                 </links>
212                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
213                         <actions>
214                                 <create permission="CREATE_IMPORT_ITEM">
215                     <context link="definition" field="owner"/>
216                                 </create>
217                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
218                     <context link="definition" field="owner"/>
219                                 </retrieve>
220                                 <update permission="UPDATE_IMPORT_ITEM">
221                     <context link="definition" field="owner"/>
222                                 </update>
223                                 <delete permission="DELETE_IMPORT_ITEM">
224                     <context link="definition" field="owner"/>
225                                 </delete>
226                         </actions>
227                 </permacrud>
228         </class>
229
230         <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">
231                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
232                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
233                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
234                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
235                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
236                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
237                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
238                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
239                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
240                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
241                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
242                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
243                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
244                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
245                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
246                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
247                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
248                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
249                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
250                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
251                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
252                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
253                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
254                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
255                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
256                 </fields>
257                 <links>
258                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
259                 </links>
260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
261                         <actions>
262                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
263                                 <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"/>
264                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
265                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
266                         </actions>
267                 </permacrud>
268         </class>
269
270         <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">
271                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
272                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
273                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
274                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
275                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
276                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
277                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
278                 </fields>
279                 <links>
280                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
281                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
282                 </links>
283                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
284                         <actions>
285                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
286                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
287                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
288                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
289                         </actions>
290                 </permacrud>
291         </class>
292
293         <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">
294                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
295                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
296                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
297                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
298                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
299                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
300                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
301                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
302                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
303                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
304                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
305                 </fields>
306                 <links>
307                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
308                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
309                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
310             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
311             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
312                 </links>
313                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
314                         <actions>
315                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
316                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
317                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
318                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
319                         </actions>
320                 </permacrud>
321         </class>
322
323         <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">
324                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
325                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
326                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
327                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
328                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
329                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
330                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
331                 </fields>
332                 <links/>
333                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
334                         <actions>
335                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
336                 <retrieve/>
337                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
338                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
339                         </actions>
340                 </permacrud>
341         </class>
342
343         <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">
344                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
345                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
346                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
347                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
348                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
349                 </fields>
350                 <links>
351                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
352                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
353                 </links>
354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
355                         <actions>
356                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
357                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
358                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
359                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
360                         </actions>
361                 </permacrud>
362         </class>
363
364         <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">
365                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
366                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
367                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
368                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
369                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
370                         <field reporter:label="Field Type" name="field_type" reporter:datatype="text"/>
371                 </fields>
372                 <links>
373                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
374                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
375                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
376                 </links>
377                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
378                         <actions>
379                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
380                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
381                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
382                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
383                         </actions>
384                 </permacrud>
385         </class>
386
387         <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">
388                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
389                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
390                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
391                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
392                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
393                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
394                 </fields>
395                 <links>
396                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
397                 </links>
398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
399                         <actions>
400                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
401                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
402                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
403                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
404                         </actions>
405                 </permacrud>
406         </class>
407
408         <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">
409                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
410                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
411                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
412                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
413                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
414                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
415                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
416                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
417                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
418                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
419                 </fields>
420                 <links>
421                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
422                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
423             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
424             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
425                 </links>
426                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
427                         <actions>
428                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
429                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
430                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
431                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
432                         </actions>
433                 </permacrud>
434         </class>
435
436         <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">
437                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
438                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
439                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
440                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
441                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
442                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
443                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
444                 </fields>
445                 <links/>
446                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
447                         <actions>
448                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
449                 <retrieve/>
450                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
451                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
452                         </actions>
453                 </permacrud>
454         </class>
455
456         <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">
457                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
458                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
459                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
460                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
461                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
462                 </fields>
463                 <links>
464                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
465                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
466                 </links>
467                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
468                         <actions>
469                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
470                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
471                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
472                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
473                         </actions>
474                 </permacrud>
475         </class>
476
477         <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">
478                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
479                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
480                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
481                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
482                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
483                 </fields>
484                 <links>
485                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
486                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
487                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
488                 </links>
489                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
490                         <actions>
491                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
492                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
493                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
494                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
495                         </actions>
496                 </permacrud>
497         </class>
498
499
500         <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">
501                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
502                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
503                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
504                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
505                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
506                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
507                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
508                 </fields>
509                 <links>
510                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
511                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
512                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
513                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
514                 </links>
515         </class>
516
517     <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">
518         <fields oils_persist:primary="name">
519             <field reporter:label="Name" name="name" reporter:datatype="text"/>
520             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
521             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
522             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
523         </fields>
524         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
525             <actions>
526                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
527                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
528                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
529                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
530             </actions>
531         </permacrud>
532     </class>
533
534     <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">
535         <fields oils_persist:primary="id">
536             <field reporter:label="ID" name="id" reporter:datatype="id"/>
537             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
538             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
539             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
540             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
541         </fields>
542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
543             <actions>
544                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
545                 <retrieve/>
546                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
547                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
548             </actions>
549         </permacrud>
550     </class>
551
552         <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">
553                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
554                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
555                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
556                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
557                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
558                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
559                 </fields>
560                 <links>
561                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
562                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
563                 </links>
564         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
565             <actions>
566                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
567                 <retrieve/>
568                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
569                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
570             </actions>
571         </permacrud>
572         </class>
573
574         <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">
575                 <fields oils_persist:primary="name">
576                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
577                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
578                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
579                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
580                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
581                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
582                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
583                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
584                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
585                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
586                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
587                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
588                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
589                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
590                 </fields>
591                 <links>
592                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
593                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
594                 </links>
595         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
596             <actions>
597                 <create permission="ADMIN_SVF" global_required="true"/>
598                 <retrieve/>
599                 <update permission="ADMIN_SVF" global_required="true"/>
600                 <delete permission="ADMIN_SVF" global_required="true"/>
601             </actions>
602         </permacrud>
603         </class>
604
605         <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">
606                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
607                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
608                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
609                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
610                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
611                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
612                 </fields>
613                 <links>
614                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
615                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
616                 </links>
617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
618             <actions>
619                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
620                 <retrieve/>
621                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
622                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
623             </actions>
624         </permacrud>
625         </class>
626
627         <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">
628                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
629                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
630                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"/>
631                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
632                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
633                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
634                 </fields>
635                 <links>
636                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
637                 </links>
638         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
639             <actions>
640                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
641                 <retrieve/>
642                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
643                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
644             </actions>
645         </permacrud>
646         </class>
647
648         <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">
649                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
650                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
651                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
652                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
653                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
654                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
655                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
656                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
657                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
658                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
659                 </fields>
660                 <links>
661                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
662                 </links>
663         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
664             <actions>
665                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
666                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
667                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
668                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
669             </actions>
670         </permacrud>
671         </class>
672
673     <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">
674         <fields oils_persist:primary="name">
675             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
676             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
677             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
678             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
679             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
680             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
681             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
682             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
683             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
684         </fields>
685         <links>
686             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
687         </links>
688         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
689             <actions>
690                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
691                 <retrieve/>
692                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
693                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
694             </actions>
695         </permacrud>
696     </class>
697
698     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
699         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
700             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
701             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
702             <field reporter:label="Name" name="name" reporter:datatype="text"/>
703             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
704             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
705             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
706             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
707         </fields>
708         <links>
709             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
710         </links>
711     </class>
712
713         <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">
714                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
715                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
716                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
717                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
718                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
719                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
720                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
721                 </fields>
722                 <links>
723             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
724             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
725                 </links>
726                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
727                         <actions>
728                                 <retrieve/>
729                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
730                         </actions>
731                 </permacrud>
732         </class>
733
734         <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">
735                 <fields oils_persist:primary="key">
736                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
737                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
738                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
739                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
740                 </fields>
741                 <links/>
742                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
743                         <actions>
744                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
745                                 <retrieve/>
746                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
747                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
748                         </actions>
749                 </permacrud>
750         </class>
751
752         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
753                 <fields oils_persist:primary="module">
754                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
755                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
756                 </fields>
757                 <links/>
758         </class>
759
760         <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">
761                 <fields oils_persist:primary="module">
762                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
763                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
764                 </fields>
765                 <links/>
766                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
767                         <actions>
768                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
769                                 <retrieve/>
770                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
771                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
772                         </actions>
773                 </permacrud>
774         </class>
775
776         <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">
777                 <fields oils_persist:primary="module">
778                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
779                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
780                 </fields>
781                 <links/>
782                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
783                         <actions>
784                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
785                                 <retrieve/>
786                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
787                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
788                         </actions>
789                 </permacrud>
790         </class>
791
792         <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">
793                 <fields oils_persist:primary="module">
794                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
795                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
796                 </fields>
797                 <links/>
798                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
799                         <actions>
800                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
801                                 <retrieve/>
802                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
803                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
804                         </actions>
805                 </permacrud>
806         </class>
807
808         <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">
809                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
810                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
811                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
812                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
813                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
814                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
815                 </fields>
816                 <links>
817                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
818                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
819                 </links>
820                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
821                         <actions>
822                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
823                     <context link="event_def" field="owner"/>
824                 </create>
825                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
826                     <context link="event_def" field="owner"/>
827                 </retrieve>
828                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
829                     <context link="event_def" field="owner"/>
830                 </update>
831                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
832                     <context link="event_def" field="owner"/>
833                 </delete>
834                         </actions>
835                 </permacrud>
836         </class>
837
838         <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">
839                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
840                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
841                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
842                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
843                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
844                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
845                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
846                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
847                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
848                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
849                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
850                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
851                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
852                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
853                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
854                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
855                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
856                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
857                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
858                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
859                 </fields>
860                 <links>
861                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
862                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
863                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
864                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
865                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
866                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
867                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
868                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
869                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
870                 </links>
871                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
872                         <actions>
873                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
874                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
875                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
876                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
877                         </actions>
878                 </permacrud>
879         </class>
880
881         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
882                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
883                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
884                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
885                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
886                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
887                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
888                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
889                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
890                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
891                         <field reporter:label="State" name="state" reporter:datatype="text"/>
892                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
893                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
894                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
895                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
896                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
897                 </fields>
898                 <links>
899                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
900                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
901                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
902                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
903                 </links>
904         </class>
905
906         <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">
907                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
908                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
909                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
910                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
911                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
912                 </fields>
913                 <links>
914                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
915                 </links>
916                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
917                         <actions>
918                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
919                     <context link="event_def" field="owner"/>
920                 </create>
921                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
922                     <context link="event_def" field="owner"/>
923                 </retrieve>
924                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
925                     <context link="event_def" field="owner"/>
926                 </update>
927                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
928                     <context link="event_def" field="owner"/>
929                 </delete>
930                         </actions>
931                 </permacrud>
932         </class>
933
934         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
935                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
936                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
937                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
938                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
939                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
940                 </fields>
941                 <links>
942                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
943                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
944                 </links>
945         </class>
946
947         <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">
948                 <fields oils_persist:primary="code">
949                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
950                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
951                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
952                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
953                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
954                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
955                 </fields>
956                 <links/>
957         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
958             <actions>
959                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
960                 <retrieve/>
961                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
962                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
963             </actions>
964         </permacrud>
965         </class>
966
967         <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">
968                 <fields oils_persist:primary="code">
969                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
970                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
971                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
972                 </fields>
973                 <links/>
974         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
975             <actions>
976                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
977                 <retrieve/>
978                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
979                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
980             </actions>
981         </permacrud>
982         </class>
983
984         <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">
985                 <fields oils_persist:primary="code">
986                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
987                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
988                 </fields>
989                 <links/>
990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
991             <actions>
992                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
993                 <retrieve/>
994                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
995                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
996             </actions>
997         </permacrud>
998         </class>
999
1000         <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">
1001                 <fields oils_persist:primary="code">
1002                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1003                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1004                 </fields>
1005                 <links/>
1006         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1007             <actions>
1008                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1009                 <retrieve/>
1010                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1011                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1012             </actions>
1013         </permacrud>
1014         </class>
1015
1016         <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">
1017                 <fields oils_persist:primary="code">
1018                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1019                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1020                 </fields>
1021                 <links/>
1022         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1023             <actions>
1024                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1025                 <retrieve/>
1026                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1027                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1028             </actions>
1029         </permacrud>
1030         </class>
1031
1032         <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">
1033                 <fields oils_persist:primary="code">
1034                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1035                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1036                 </fields>
1037                 <links/>
1038         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1039             <actions>
1040                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1041                 <retrieve/>
1042                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1043                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1044             </actions>
1045         </permacrud>
1046         </class>
1047
1048         <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">
1049                 <fields oils_persist:primary="code">
1050                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1051                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1052                 </fields>
1053                 <links/>
1054         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1055             <actions>
1056                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1057                 <retrieve/>
1058                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1059                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1060             </actions>
1061         </permacrud>
1062         </class>
1063
1064         <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">
1065                 <fields oils_persist:primary="code">
1066                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1067                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1068                 </fields>
1069                 <links/>
1070         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1071             <actions>
1072                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1073                 <retrieve/>
1074                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1075                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1076             </actions>
1077         </permacrud>
1078         </class>
1079
1080     <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">
1081         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1082             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1083             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1084             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1085             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1086             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1087             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1088             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1089             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1090             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1091             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1092             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1093             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1094             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1095             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1096         </fields>
1097         <links/>
1098         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1099             <actions>
1100                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1101                 <retrieve/>
1102                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1103                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1104             </actions>
1105         </permacrud>
1106     </class>
1107
1108     <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">
1109         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1110             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1111             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1112             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1113             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1114             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1115             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1116             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1117             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1118             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1119             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1120             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1121             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1122             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1123             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1124         </fields>
1125         <links/>
1126         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1127             <actions>
1128                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1129                 <retrieve/>
1130                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1131                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1132             </actions>
1133         </permacrud>
1134     </class>
1135
1136     <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">
1137         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1138             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1139             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1140             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1141             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1142             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1143         </fields>
1144         <links>
1145             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1146             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1147             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1148         </links>
1149         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1150             <actions>
1151                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1152                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1153                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1154                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1155             </actions>
1156         </permacrud>
1157     </class>
1158
1159         <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">
1160                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1161                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1162                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1163                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1164                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1165                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1166                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1167                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1168                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1169                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1170                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1171                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1172                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1173                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1174                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1175                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1176                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1177                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1178                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1179                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1180                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1181                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1182                 </fields>
1183                 <links>
1184                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1185                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1186                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1187                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1188                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1189                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1190                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1191                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1192                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1193                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1194                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1195                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1196             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1197                 </links>
1198         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1199             <actions>
1200                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1201                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1202                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1203                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1204             </actions>
1205         </permacrud>
1206         </class>
1207
1208         <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">
1209                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1210                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1211                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1212                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1213                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1214                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1215                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1216                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1217                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1218                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1219                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1220                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1221                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1222                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1223             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1224                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1225                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1226                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1227                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1228                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1229                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1230             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1231             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1232                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1233                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1234                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1235                 </fields>
1236                 <links>
1237                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1238                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1239                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1240                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1241                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1242                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1243                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1244                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1245                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1246                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1247                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1248                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1249             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1250                 </links>
1251         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1252             <actions>
1253                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1254                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1255                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1256                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1257             </actions>
1258         </permacrud>
1259         </class>
1260
1261         <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">
1262                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1263                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1264                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1265                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1266                 </fields>
1267                 <links>
1268                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1269                 </links>
1270         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1271             <actions>
1272                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1273                     <context link="matchpoint" field="org_unit"/>
1274                 </create>
1275                 <retrieve/>
1276                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1277                     <context link="matchpoint" field="org_unit"/>
1278                 </update>
1279                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1280                     <context link="matchpoint" field="org_unit"/>
1281                 </delete>
1282             </actions>
1283         </permacrud>
1284         </class>
1285
1286         <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">
1287                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1288                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1289                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1290                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1291                 </fields>
1292                 <links>
1293                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1294                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1295                 </links>
1296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1297             <actions>
1298                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1299                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1300                 </create>
1301                 <retrieve/>
1302                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1303                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1304                 </update>
1305                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1306                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1307                 </delete>
1308             </actions>
1309         </permacrud>
1310         </class>
1311
1312         <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">
1313                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1314                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1315                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1316                 </fields>
1317                 <links/>
1318         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1319             <actions>
1320                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1321                 <retrieve/>
1322                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1323                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1324             </actions>
1325         </permacrud>
1326         </class>
1327
1328         <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">
1329                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1330                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1331                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1332                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1333                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1334                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1335                 </fields>
1336                 <links>
1337                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1338                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1339                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1340                 </links>
1341         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1342             <actions>
1343                 <create permission="ADMIN_SURVEY">
1344                     <context link="survey" field="owner"/>
1345                 </create>
1346                 <retrieve/>
1347                 <update permission="ADMIN_SURVEY">
1348                     <context link="survey" field="owner"/>
1349                 </update>
1350                 <delete permission="ADMIN_SURVEY">
1351                     <context link="survey" field="owner"/>
1352                 </delete>
1353             </actions>
1354         </permacrud>
1355         </class>
1356         <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">
1357                 <fields oils_persist:primary="id" oils_persist:sequence="">
1358                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1359                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1360                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1361                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1362                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1363                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1364                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1365                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1366                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1367                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1368                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1369                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1370                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1371                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1372                 </fields>
1373                 <links>
1374                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1375                 </links>
1376         </class>
1377         <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">
1378                 <fields oils_persist:primary="id" oils_persist:sequence="">
1379                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1380                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1381                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1382                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1383                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1384                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1385                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1386                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1387                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1388                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1389                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1390                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1391                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1392                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1393                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1394                 </fields>
1395                 <links>
1396                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1397                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1398                 </links>
1399         </class>
1400         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1401                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1402                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1403                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1404                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1405                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1406                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1407                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1408                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1409                 </fields>
1410                 <links>
1411                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1412                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1413                 </links>
1414         </class>
1415         <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">
1416                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1417                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1418                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1419                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1420                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1421                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1422                 </fields>
1423                 <links>
1424                         <link field="usr" reltype="has_a" key="id" class="au"/>
1425                 </links>
1426         </class>
1427         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1428                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1429                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1430                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1431                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1432                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1433                 </fields>
1434                 <links>
1435                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1436                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1437                 </links>
1438         </class>
1439         <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">
1440                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1441                         <field name="field" reporter:datatype="link"/>
1442                         <field name="id" reporter:datatype="id" />
1443                         <field name="source" reporter:datatype="link"/>
1444                         <field name="value" reporter:datatype="text"/>
1445                 </fields>
1446                 <links>
1447                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1448                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1449                 </links>
1450         </class>
1451         <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">
1452                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1453                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1454                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1455                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1456                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1457                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1458                 </fields>
1459                 <links>
1460                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1461                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1462                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1463                 </links>
1464         </class>
1465         <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">
1466                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1467                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1468                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1469                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1470                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1471                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1472                 </fields>
1473                 <links>
1474                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1475                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1476                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1477                 </links>
1478         </class>
1479         <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">
1480                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1481                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1482                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1483                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1484                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1485                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1486                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1487                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1488                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1489                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1490                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1491                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1492                 </fields>
1493                 <links>
1494                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1495                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1496                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1497                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1498                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1499                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1500                 </links>
1501         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1502             <actions>
1503                 <create permission="TRANSIT_COPY" context_field="owner">
1504                     <context link="target_copy" field="circ_lib"/>
1505                 </create>
1506                 <retrieve/>
1507                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1508                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1509             </actions>
1510         </permacrud>
1511         </class>
1512         <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">
1513                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1514                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1515                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1516                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1517                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1518                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1519                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1520                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1521                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1522                 </fields>
1523                 <links>
1524                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1525                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1526                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1527                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1528                 </links>
1529         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1530             <actions>
1531                 <create permission="ADMIN_SURVEY">
1532                     <context link="survey" field="owner"/>
1533                 </create>
1534                 <retrieve/>
1535                 <update permission="ADMIN_SURVEY">
1536                     <context link="survey" field="owner"/>
1537                 </update>
1538                 <delete permission="ADMIN_SURVEY">
1539                     <context link="survey" field="owner"/>
1540                 </delete>
1541             </actions>
1542         </permacrud>
1543         </class>
1544         <class id="ccbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
1545                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1546                         <field name="bucket" />
1547                         <field name="id" reporter:datatype="id" />
1548                         <field name="target_copy" reporter:datatype="link"/>
1549                         <field name="create_time" reporter:datatype="timestamp" />
1550                         <field name="pos" reporter:datatype="int" />
1551                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1552                 </fields>
1553                 <links>
1554                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1555                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1556             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1557                 </links>
1558         </class>
1559         <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">
1560                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1561                         <field name="id" reporter:datatype="id" />
1562                         <field name="item" reporter:datatype="link"/>
1563                         <field name="note" reporter:datatype="text" />
1564                 </fields>
1565                 <links>
1566                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1567                 </links>
1568         </class>
1569         <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">
1570                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1571                         <field name="active" reporter:datatype="bool"/>
1572                         <field name="create_date" reporter:datatype="timestamp"/>
1573                         <field name="creator" />
1574                         <field name="deleted" reporter:datatype="bool"/>
1575                         <field name="edit_date" reporter:datatype="timestamp"/>
1576                         <field name="editor" />
1577                         <field name="id" reporter:datatype="id" />
1578                         <field name="last_xact_id" />
1579                         <field name="marc" />
1580                         <field name="source" />
1581                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1582                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1583                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1584                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
1585                 </fields>
1586                 <links>
1587                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1588                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1589                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1590                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1591                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
1592                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1593                 </links>
1594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1595                         <actions>
1596                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1597                                 <retrieve/>
1598                                 <update permission="UPDATE_MARC" global_required="true"/>
1599                                 <delete permission="UPDATE_MARC" global_required="true"/>
1600                         </actions>
1601                 </permacrud>
1602         </class>
1603         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1604                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1605                         <field name="char_encoding" />
1606                         <field name="id" />
1607                         <field name="record" />
1608                         <field name="record_status" />
1609                 </fields>
1610                 <links>
1611                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1612                 </links>
1613         </class>
1614         <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">
1615                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
1616                         <field name="id" reporter:datatype="id" />
1617                         <field name="bib" reporter:datatype="link" />
1618                         <field name="authority" reporter:datatype="link" />
1619                 </fields>
1620                 <links>
1621                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
1622                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
1623                 </links>
1624         </class>
1625         <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">
1626                 <fields oils_persist:primary="code" oils_persist:sequence="">
1627                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1628                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1629                 </fields>
1630                 <links/>
1631         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1632             <actions>
1633                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1634                 <retrieve/>
1635                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1636                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1637             </actions>
1638         </permacrud>
1639         </class>
1640         <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">
1641                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1642                         <field name="accepting_usr" />
1643                         <field name="amount" reporter:datatype="money" />
1644                         <field name="amount_collected" reporter:datatype="money" />
1645                         <field name="approval_code" reporter:datatype="text"/>
1646                         <field name="cash_drawer" reporter:datatype="link"/>
1647                         <field name="cc_first_name" reporter:datatype="text"/>
1648                         <field name="cc_last_name" reporter:datatype="text"/>
1649                         <field name="cc_number" reporter:datatype="text"/>
1650                         <field name="cc_order_number" reporter:datatype="text"/>
1651                         <field name="cc_type" reporter:datatype="text"/>
1652                         <field name="cc_processor" reporter:datatype="text"/>
1653                         <field name="expire_month" reporter:datatype="int" />
1654                         <field name="expire_year" reporter:datatype="int" />
1655                         <field name="id" reporter:datatype="id" />
1656                         <field name="note" reporter:datatype="text"/>
1657                         <field name="payment_ts" reporter:datatype="timestamp"/>
1658                         <field name="xact" reporter:datatype="link"/>
1659                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1660                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1661                 </fields>
1662                 <links>
1663                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1664                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1665                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1666                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1667                 </links>
1668         </class>
1669         <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">
1670                 <fields oils_persist:primary="name">
1671                         <field reporter:label="Field Class" name="field_class" />
1672                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1673                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1674                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1675                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1676                 </fields>
1677                 <links/>
1678         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1679             <actions>
1680                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1681                 <retrieve/>
1682                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1683                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1684             </actions>
1685         </permacrud>
1686         </class>
1687
1688         <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">
1689                 <fields oils_persist:primary="alias">
1690                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
1691                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1692                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
1693                 </fields>
1694                 <links>
1695                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1696                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1697                 </links>
1698         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1699             <actions>
1700                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1701                 <retrieve/>
1702                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
1703                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
1704             </actions>
1705         </permacrud>
1706         </class>
1707
1708         <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">
1709                 <fields oils_persist:primary="name">
1710                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1711                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1712                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1713                 </fields>
1714                 <links>
1715                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
1716                 </links>
1717         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1718             <actions>
1719                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
1720                 <retrieve/>
1721                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
1722                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
1723             </actions>
1724         </permacrud>
1725         </class>
1726
1727         <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">
1728                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1729                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
1730                         <field reporter:label="ID" name="id" reporter:datatype="id" />
1731                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1732                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1733                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1734                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
1735                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1736                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
1737                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
1738                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
1739                 </fields>
1740                 <links>
1741                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
1742                 </links>
1743         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1744             <actions>
1745                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1746                 <retrieve/>
1747                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1748                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1749             </actions>
1750         </permacrud>
1751         </class>
1752         <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">
1753                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
1754                         <field name="id" reporter:datatype="id" />
1755                         <field name="name" reporter:datatype="text"/>
1756                         <field name="xpath" reporter:datatype="text"/>
1757                         <field name="format" reporter:datatype="link"/>
1758                         <field name="first_word" reporter:datatype="bool" />
1759                 </fields>
1760                 <links/>
1761         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1762             <actions>
1763                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
1764                 <retrieve/>
1765                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
1766                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
1767             </actions>
1768         </permacrud>
1769         </class>
1770         <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">
1771                 <fields oils_persist:primary="code" oils_persist:sequence="">
1772                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1773                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1774                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1775                 </fields>
1776                 <links/>
1777         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1778             <actions>
1779                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1780                 <retrieve/>
1781                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1782                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1783             </actions>
1784         </permacrud>
1785         </class>
1786         <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">
1787                 <fields oils_persist:primary="code" oils_persist:sequence="">
1788                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1789                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1790                 </fields>
1791                 <links/>
1792         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1793             <actions>
1794                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1795                 <retrieve/>
1796                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1797                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1798             </actions>
1799         </permacrud>
1800         </class>
1801     <class id="acnc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
1802         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
1803             <field reporter:label="Call number class ID" name="id" reporter_datatype="id"/>
1804             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1805             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
1806             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
1807         </fields>
1808     </class>
1809         <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">
1810                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
1811                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
1812                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
1813                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
1814                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1815                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
1816                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1817                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
1818                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
1819                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1820                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
1821                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1822                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1823                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
1824                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
1825                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
1826                 </fields>
1827                 <links>
1828                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1829                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1830                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1831                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1832                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
1833                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
1834                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
1835                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
1836                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
1837                 </links>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
1841                 <retrieve/>
1842                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
1843                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
1844             </actions>
1845         </permacrud>
1846         </class>
1847         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
1848                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
1849                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
1850                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
1851                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1852                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
1853                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1854                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1855                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1856                 </fields>
1857                 <links>
1858                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
1859                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
1860         </links>
1861         </class>
1862         <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">
1863                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
1864                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1865                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
1866                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
1867                 </fields>
1868                 <links>
1869                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
1870                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
1871                 </links>
1872         </class>
1873         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
1874                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
1875                         <field name="id" reporter:datatype="id" />
1876                         <field name="value" oils_persist:i18n="true" />
1877                 </fields>
1878                 <links/>
1879         </class>
1880         <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">
1881                 <fields oils_persist:primary="usr" oils_persist:sequence="">
1882                         <field name="balance_owed" reporter:datatype="money" />
1883                         <field name="total_owed" reporter:datatype="money" />
1884                         <field name="total_paid" reporter:datatype="money" />
1885                         <field name="usr" reporter:datatype="link"/>
1886                 </fields>
1887                 <links>
1888                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1889         </links>
1890         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1891             <actions>
1892                 <retrieve permission="VIEW_USER">
1893                     <context link="usr" field="home_ou"/>
1894                 </retrieve>
1895             </actions>
1896         </permacrud>
1897         </class>
1898         <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">
1899                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
1900                         <field name="collector" />
1901                         <field name="enter_time" reporter:datatype="timestamp"/>
1902                         <field name="id" reporter:datatype="id" />
1903                         <field name="location" reporter:datatype="link"/>
1904                         <field name="usr" reporter:datatype="link"/>
1905                 </fields>
1906                 <links>
1907                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1908                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
1909                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
1910                 </links>
1911         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1912             <actions>
1913                 <create permission="money.collections_tracker.create" context_field="location"/>
1914                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
1915                 <delete permission="money.collections_tracker.create" context_field="location"/>
1916             </actions>
1917         </permacrud>
1918         </class>
1919         <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">
1920                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
1921                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1922                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1923                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
1924                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1925                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
1926                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
1927                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
1928                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1929                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
1930                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
1931                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
1932                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
1933                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
1934                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
1935                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
1936                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
1937                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1938                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
1939                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
1940                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
1941                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1942                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1943                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1944                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1945                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1946                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1947                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1948                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1949                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
1950                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
1951                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
1952                 </fields>
1953                 <links>
1954                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1955                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1956                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1957                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
1958                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
1959                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
1960                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
1961                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
1962                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
1963                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
1964                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
1965                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
1966                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
1967                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
1968                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
1969                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
1970                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
1971                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
1972                 </links>
1973         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1974             <actions>
1975                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1976                 <retrieve/>
1977                 <update permission="UPDATE_MARC" global_required="true"/>
1978             </actions>
1979         </permacrud>
1980         </class>
1981         <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">
1982                 <fields oils_persist:primary="id">
1983                         <field name="dow_0_close" />
1984                         <field name="dow_0_open" />
1985                         <field name="dow_1_close" />
1986                         <field name="dow_1_open" />
1987                         <field name="dow_2_close" />
1988                         <field name="dow_2_open" />
1989                         <field name="dow_3_close" />
1990                         <field name="dow_3_open" />
1991                         <field name="dow_4_close" />
1992                         <field name="dow_4_open" />
1993                         <field name="dow_5_close" />
1994                         <field name="dow_5_open" />
1995                         <field name="dow_6_close" />
1996                         <field name="dow_6_open" />
1997                         <field name="id" reporter:datatype="id" />
1998                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
1999                 </fields>
2000                 <links>
2001                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2002                 </links>
2003         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2004             <actions>
2005                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2006                 <retrieve/>
2007                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2008                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2009             </actions>
2010         </permacrud>
2011         </class>
2012         <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">
2013                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2014                         <field name="close_end" reporter:datatype="timestamp" />
2015                         <field name="close_start" reporter:datatype="timestamp" />
2016                         <field name="id" reporter:datatype="id" />
2017                         <field name="org_unit" reporter:datatype="org_unit"/>
2018                         <field name="reason" reporter:datatype="text"/>
2019                 </fields>
2020                 <links>
2021                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2022                 </links>
2023         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2024             <actions>
2025                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2026                 <retrieve/>
2027                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2028                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2029             </actions>
2030         </permacrud>
2031         </class>
2032         <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">
2033                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2034                         <field name="extended" reporter:datatype="interval"/>
2035                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2036                         <field name="max_renewals" reporter:datatype="int" />
2037                         <field name="name" reporter:datatype="text"/>
2038                         <field name="normal" reporter:datatype="interval"/>
2039                         <field name="shrt" reporter:datatype="interval"/>
2040                 </fields>
2041                 <links>
2042                 </links>
2043         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2044             <actions>
2045                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2046                 <retrieve/>
2047                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2048                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2049             </actions>
2050         </permacrud>
2051         </class>
2052
2053         <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">
2054                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2055                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2056                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2057             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2058                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2059             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2060                 </fields>
2061                 <links>
2062             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2063                 </links>
2064                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2065             <actions>
2066                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2067                 <retrieve/>
2068                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2069                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2070             </actions>
2071                 </permacrud>
2072         </class>
2073
2074         <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">
2075                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2076                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2077                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2078                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2079             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2080                 </fields>
2081                 <links>
2082                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2083                 </links>
2084                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2085             <actions>
2086                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2087                 <retrieve/>
2088                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2089                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2090             </actions>
2091                 </permacrud>
2092         </class>
2093
2094         <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">
2095                 <fields oils_persist:primary="id" oils_persist:sequence="">
2096                         <field name="balance_owed" reporter:datatype="money"/>
2097                         <field name="id" reporter:datatype="id" />
2098                         <field name="last_billing_note" reporter:datatype="text"/>
2099                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2100                         <field name="last_billing_type" reporter:datatype="text"/>
2101                         <field name="last_payment_note" reporter:datatype="text"/>
2102                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2103                         <field name="last_payment_type" reporter:datatype="text"/>
2104                         <field name="total_owed" reporter:datatype="money"/>
2105                         <field name="total_paid" reporter:datatype="money"/>
2106                         <field name="usr" reporter:datatype="link"/>
2107                         <field name="xact_finish" reporter:datatype="timestamp" />
2108                         <field name="xact_start" reporter:datatype="timestamp" />
2109                         <field name="xact_type" reporter:datatype="text"/>
2110                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2111                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2112                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2113                         <field name="billing_location" reporter:datatype="link"/>
2114                 </fields>
2115                 <links>
2116                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2117                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2118                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2119                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2120                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2121                 </links>
2122         </class>
2123         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2124                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2125                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2126                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2127                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2128                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2129                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2130                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2131                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2132                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2133                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2134                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2135                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2136                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2137                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2138                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2139                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2140                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2141                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2142                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2143                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2144                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2145                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2146                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2147                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2148                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2149                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2150                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2151                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2152                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2153                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2154                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2155                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2156                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2157                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2158                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2159                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2160                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2161                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2162                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2163                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2164                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2165                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2166                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2167                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2168                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2169                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2170                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2171                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2172                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2173                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2174                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2175                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2176                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2177                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2178                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2179                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2180                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2181                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2182                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2183                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2184                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2185                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2186                 </fields>
2187                 <links>
2188                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2189                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2190                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2191                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2192                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2193                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2194                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2195                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2196                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2197                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2198                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2199                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2200                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2201                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2202                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2203                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2204                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2205                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2206                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2207                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2208                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2209                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2210                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2211                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2212                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2213                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2214                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2215                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2216                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2217                 </links>
2218         </class>
2219
2220         <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">
2221                 <fields oils_persist:primary="name">
2222                         <field name="name" reporter:datatype="text"/>
2223                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2224                 </fields>
2225                 <links/>
2226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2227                         <actions>
2228                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2229                                 <retrieve/>
2230                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2231                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2232                         </actions>
2233                 </permacrud>
2234         </class>
2235         <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">
2236                 <fields oils_persist:primary="name">
2237                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2238                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2239                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2240                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2241                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2242                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2243                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2244                 </fields>
2245                 <links>
2246                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2247                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2248                 </links>
2249                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2250                         <actions>
2251                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2252                                 <retrieve/>
2253                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2254                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2255                         </actions>
2256                 </permacrud>
2257         </class>
2258         <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">
2259                 <fields oils_persist:primary="name">
2260                         <field name="name" reporter:datatype="text"/>
2261                         <field name="label" reporter:datatype="text"/>
2262                         <field name="description" reporter:datatype="text"/>
2263                         <field name="datatype" reporter:datatype="text"/>
2264                         <field name="view_perm" reporter:datatype="link"/>
2265                         <field name="update_perm" reporter:datatype="link"/>
2266                         <field name="fm_class" reporter:datatype="text"/>
2267                         <field name="grp" reporter:datatype="link"/>
2268                 </fields>
2269                 <links>
2270                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2271                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2272                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2273                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2274                 </links>
2275                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2276                         <actions>
2277                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2278                                 <retrieve/>
2279                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2280                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2281                         </actions>
2282                 </permacrud>
2283         </class>
2284         <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">
2285                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2286                         <field name="id" />
2287                         <field name="name"  reporter:datatype="text"/>
2288                         <field name="org_unit" reporter:datatype="org_unit"/>
2289                         <field name="value"  reporter:datatype="text"/>
2290                 </fields>
2291                 <links>
2292                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2293                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2294                 </links>
2295         </class>
2296         <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">
2297                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2298                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2299                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2300                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2301                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2302                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2303                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2304                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2305                 </fields>
2306                 <links>
2307                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2308                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2309                 </links>
2310         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2311             <actions>
2312                 <create permission="CREATE_COPY_NOTE">
2313                     <context link="owning_copy" field="circ_lib"/>
2314                 </create>
2315                 <retrieve permission="VIEW_COPY_NOTES">
2316                     <context link="owning_copy" field="circ_lib"/>
2317                 </retrieve>
2318                 <update permission="UPDATE_COPY_NOTE">
2319                     <context link="owning_copy" field="circ_lib"/>
2320                 </update>
2321                 <delete permission="DELETE_COPY_NOTE">
2322                     <context link="owning_copy" field="circ_lib"/>
2323                 </delete>
2324             </actions>
2325         </permacrud>
2326         </class>
2327         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2328                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2329                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2330                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2331                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2332                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2333                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2334                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2335                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2336                 </fields>
2337                 <links>
2338                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2339                 </links>
2340         </class>
2341         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2342                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2343                         <field name="fingerprint"  reporter:datatype="text"/>
2344                         <field name="id" reporter:datatype="id" />
2345                         <field name="master_record" reporter:datatype="link"/>
2346                         <field name="mods"  reporter:datatype="text"/>
2347                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2348                 </fields>
2349                 <links>
2350                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2351                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2352                 </links>
2353         </class>
2354         <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">
2355                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2356                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2357                         <field name="name"  reporter:datatype="text"/>
2358                 </fields>
2359                 <links/>
2360         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2361             <actions>
2362                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2363                 <retrieve/>
2364                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2365                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2366             </actions>
2367         </permacrud>
2368         </class>
2369         <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">
2370                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2371                         <field name="code"  reporter:datatype="text"/>
2372                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2373                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2374                 </fields>
2375                 <links/>
2376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2377             <actions>
2378                 <create permission="CREATE_PERM" global_required="true"/>
2379                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2380                 <update permission="UPDATE_PERM" global_required="true"/>
2381                 <delete permission="DELETE_PERM" global_required="true"/>
2382             </actions>
2383         </permacrud>
2384         </class>
2385         <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">
2386                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2387                         <field name="id" reporter:datatype="id" />
2388                         <field name="metarecord" reporter:datatype="link"/>
2389                         <field name="source" reporter:datatype="link"/>
2390                 </fields>
2391                 <links>
2392                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2393                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2394                 </links>
2395         </class>
2396         <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">
2397                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2398                         <field name="id" reporter:datatype="id" />
2399                         <field name="field" reporter:datatype="link"/>
2400                         <field name="source" reporter:datatype="link"/>
2401                         <field name="value"  reporter:datatype="text"/>
2402                 </fields>
2403                 <links>
2404                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2405                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2406                 </links>
2407         </class>
2408         <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">
2409                 <oils_persist:source_definition>
2410                         SELECT * FROM metabib.author_field_entry
2411                                                 UNION ALL
2412                         SELECT * FROM metabib.keyword_field_entry
2413                                                 UNION ALL
2414                         SELECT * FROM metabib.identifier_field_entry
2415                                                 UNION ALL
2416                         SELECT * FROM metabib.title_field_entry
2417                                                 UNION ALL
2418                         SELECT * FROM metabib.subject_field_entry
2419                                                 UNION ALL
2420                         SELECT * FROM metabib.series_field_entry
2421                 </oils_persist:source_definition>
2422                 <fields>
2423                         <field name="field" reporter:datatype="link"/>
2424                         <field name="id" reporter:datatype="id" />
2425                         <field name="source" reporter:datatype="link"/>
2426                         <field name="value"  reporter:datatype="text"/>
2427                 </fields>
2428                 <links>
2429                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2430                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2431                 </links>
2432         </class>
2433         <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">
2434                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2435                         <field name="field" reporter:datatype="link"/>
2436                         <field name="id" reporter:datatype="id" />
2437                         <field name="source" reporter:datatype="link"/>
2438                         <field name="value"  reporter:datatype="text"/>
2439                 </fields>
2440                 <links>
2441                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2442                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2443                 </links>
2444         </class>
2445         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2446                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2447                         <field name="accepting_usr" reporter:datatype="link"/>
2448                         <field name="amount" reporter:datatype="money" />
2449                         <field name="amount_collected" reporter:datatype="money" />
2450                         <field name="cash_drawer" reporter:datatype="link"/>
2451                         <field name="id" reporter:datatype="id" />
2452                         <field name="note"  reporter:datatype="text"/>
2453                         <field name="payment_ts" reporter:datatype="timestamp"/>
2454                         <field name="xact" reporter:datatype="link"/>
2455                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2456                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2457                 </fields>
2458                 <links>
2459                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2460                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2461                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2462                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2463                 </links>
2464         </class>
2465         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2466                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2467                         <field name="accepting_usr" reporter:datatype="link"/>
2468                         <field name="amount" reporter:datatype="money" />
2469                         <field name="amount_collected" reporter:datatype="money" />
2470                         <field name="id" reporter:datatype="id" />
2471                         <field name="note"  reporter:datatype="text"/>
2472                         <field name="payment_ts" reporter:datatype="timestamp"/>
2473                         <field name="xact" reporter:datatype="link"/>
2474                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2475                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2476                 </fields>
2477                 <links>
2478                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2479                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2480                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2481                 </links>
2482         </class>
2483         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2484                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2485                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2486                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2487                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2488                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2489                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2490                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2491                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2492                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2493                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2494                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2495                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2496                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2497                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2498                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2499                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2500                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2501                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2502                 </fields>
2503                 <links>
2504                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2505                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2506                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2507                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2508                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2509                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2510                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2511                 </links>
2512         </class>
2513
2514         <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">
2515                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2516                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2517                         <field name="name"  reporter:datatype="text"/>
2518                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2519                         <field name="block_list" reporter:datatype="text"/>
2520                         <field name="org_depth" reporter:datatype="int"/>
2521                 </fields>
2522                 <links/>
2523         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2524             <actions>
2525                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2526                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2527                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2528                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2529             </actions>
2530         </permacrud>
2531         </class>
2532         <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">
2533                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2534                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2535                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2536                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2537                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2538                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2539                 </fields>
2540                 <links>
2541                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2542                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2543                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2544         </links>
2545         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2546             <actions>
2547                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2548                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2549                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2550                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2551             </actions>
2552         </permacrud>
2553         </class>
2554         <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">
2555                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2556                         <field name="holdable" reporter:datatype="bool"/>
2557                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2558                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2559                         <field name="opac_visible" reporter:datatype="bool"/>
2560                 </fields>
2561                 <links/>
2562         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2563             <actions>
2564                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2565                 <retrieve/>
2566                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2567                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2568             </actions>
2569         </permacrud>
2570         </class>
2571         <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">
2572                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2573                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2574                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2575                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2576                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2577                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2578                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2579                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2580                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2581                 </fields>
2582                 <links>
2583                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2584                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2585                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2586                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2587                 </links>
2588                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2589                         <actions>
2590                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2591                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2592                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2593                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2594                         </actions>
2595                 </permacrud>
2596         </class>
2597         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2598                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2599                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2600                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2601                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2602                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2603                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2604                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2605                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2606                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2607                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2608                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2609                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2610                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2611                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2612                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2613                 </fields>
2614                 <links>
2615                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2616                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2617                 </links>
2618         </class>
2619
2620         <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">
2621                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
2622                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2623                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
2624                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2625                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2626                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
2627                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
2628                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
2629                 </fields>
2630                 <links>
2631                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2632                 </links>
2633         </class>
2634
2635         <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">
2636                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2637                         <field name="call_number" />
2638                         <field name="create_date" reporter:datatype="timestamp"/>
2639                         <field name="creator" reporter:datatype="link"/>
2640                         <field name="id" reporter:datatype="id" />
2641                         <field name="pub" reporter:datatype="bool"/>
2642                         <field name="title"  reporter:datatype="text"/>
2643                         <field name="value"  reporter:datatype="text"/>
2644                 </fields>
2645                 <links>
2646                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2647                 </links>
2648         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2649             <actions>
2650                 <create permission="CREATE_VOLUME_NOTE">
2651                     <context link="call_number" field="owning_lib"/>
2652                 </create>
2653                 <retrieve permission="VIEW_VOLUME_NOTES">
2654                     <context link="call_number" field="owning_lib"/>
2655                 </retrieve>
2656                 <update permission="UPDATE_VOLUME_NOTE">
2657                     <context link="call_number" field="owning_lib"/>
2658                 </update>
2659                 <delete permission="DELETE_VOLUME_NOTE">
2660                     <context link="call_number" field="owning_lib"/>
2661                 </delete>
2662             </actions>
2663         </permacrud>
2664         </class>
2665         <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">
2666                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2667                         <field name="create_date" reporter:datatype="timestamp"/>
2668                         <field name="creator" reporter:datatype="link"/>
2669                         <field name="edit_date" reporter:datatype="timestamp"/>
2670                         <field name="editor" reporter:datatype="link"/>
2671                         <field name="id" reporter:datatype="id" />
2672                         <field name="record" reporter:datatype="link"/>
2673                         <field name="value" reporter:datatype="text"/>
2674                 </fields>
2675                 <links>
2676                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2677                 </links>
2678         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2679             <actions>
2680                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2681                 <retrieve/>
2682                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2683                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2684             </actions>
2685         </permacrud>
2686         </class>
2687         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
2688         <oils_persist:source_definition>
2689 SELECT  usr,
2690         SUM(
2691             CASE
2692                 WHEN (
2693                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
2694                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2695                 ) THEN 1
2696                 ELSE 0
2697             END
2698         ) AS out,
2699
2700         SUM(
2701             CASE
2702                 WHEN (
2703                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
2704                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2705                 ) THEN 1
2706                 ELSE 0
2707             END
2708         ) AS overdue,
2709
2710         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
2711         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
2712         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
2713   FROM  action.circulation
2714   WHERE checkin_time IS NULL
2715   GROUP BY 1
2716         </oils_persist:source_definition>
2717         <fields oils_persist:primary="usr">
2718             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
2719             <field reporter:label="Out" name="out" reporter:datatype="text"/>
2720             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
2721             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
2722             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
2723             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
2724         </fields>
2725         <links>
2726             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2727         </links>
2728         </class>
2729         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
2730         <oils_persist:source_definition>
2731 SELECT  usr,
2732         ARRAY_TO_STRING(ARRAY_ACCUM(
2733             CASE
2734                 WHEN (
2735                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
2736                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2737                 ) THEN id
2738                 ELSE 0
2739             END
2740         ),',') AS out,
2741
2742         ARRAY_TO_STRING(ARRAY_ACCUM(
2743             CASE
2744                 WHEN (
2745                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
2746                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
2747                 ) THEN id
2748                 ELSE 0
2749             END
2750         ),',') AS overdue,
2751
2752         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
2753         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
2754         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
2755   FROM  action.circulation
2756   WHERE checkin_time IS NULL
2757   GROUP BY 1
2758         </oils_persist:source_definition>
2759         <fields oils_persist:primary="usr">
2760             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
2761             <field reporter:label="Out" name="out" reporter:datatype="text"/>
2762             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
2763             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
2764             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
2765             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
2766         </fields>
2767         <links>
2768             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2769         </links>
2770         </class>
2771         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
2772                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2773                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2774                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2775                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2776                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2777                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2778                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2779                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2780                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2781                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2782                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2783                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2784                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2785                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2786                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2787                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2788                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2789                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2790                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2791                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2792                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2793                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2794                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
2795                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2796                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2797                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2798                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2799                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2800                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2801                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2802                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2803                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2804                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2805                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2806                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2807                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2808                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2809                 </fields>
2810                 <links>
2811                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2812                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2813                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2814                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2815                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2816                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2817                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2818                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2819                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2820                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2821                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2822                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2823                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2824                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2825                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2826                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2827                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2828                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
2829                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2830                 </links>
2831         </class>
2832         <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">
2833                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2834                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2835                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2836                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2837                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2838                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2839                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2840                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2841                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2842                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2843                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2844                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2845                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2846                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2847                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2848                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2849                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2850                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2851                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2852                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2853                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2854                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2855                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2856                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2857                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2858                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2859                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2860                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2861                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2862                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2863                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2864                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2865                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2866                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2867                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2868                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2869                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2870                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2871                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2872                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2873                 </fields>
2874                 <links>
2875                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2876                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2877                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2878                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2879                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2880                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2881                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2882                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2883                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2884                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2885                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2886                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2887                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2888                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2889                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2890                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2891                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2892                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2893                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2894                 </links>
2895         </class>
2896         <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">
2897                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2898                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2899                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2900                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2901                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2902                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2903                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2904                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2905                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2906                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2907                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2908                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2909                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2910                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2911                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2912                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2913                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2914                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2915                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2916                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2917                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2918                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2919                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2920                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2921                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2922                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2923                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2924                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2925                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2926                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2927                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2928                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2929                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2930                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2931                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2932                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2933                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2934                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2935                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2936                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2937                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2938                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2939                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2940                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2941                 </fields>
2942                 <links>
2943                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2944                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2945                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2946                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2947                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2948                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2949                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2950                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2951                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2952                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2953                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2954                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2955                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2956                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2957                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2958                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2959                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2960                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2961                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2962                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2963                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2964                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
2965                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2966                 </links>
2967         </class>
2968
2969         <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">
2970                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
2971                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2972                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
2973                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2974                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2975                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2976                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2977                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
2978                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
2979                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
2980                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
2981                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
2982                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2983                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
2984                 </fields>
2985                 <links>
2986                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2987                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2988                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
2989                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
2990                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
2991                 </links>
2992                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2993                         <actions>
2994                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2995                                 <retrieve />
2996                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2997                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2998                         </actions>
2999                 </permacrud>
3000         </class>
3001
3002         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3003                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3004                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3005                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3006                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3007                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3008                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3009                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3010                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3011                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3012                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3013                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3014                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3015                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3016                 </fields>
3017                 <links>
3018                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3019                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3020                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3021                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3022                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3023                 </links>
3024                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3025                         <actions>
3026                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3027                                 <retrieve />
3028                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3029                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3030                         </actions>
3031                 </permacrud>
3032         </class>
3033         
3034         <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">
3035                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3036                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3037                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3038                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3039                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3040                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3041                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3042                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3043                 </fields>
3044                 <links>
3045                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3046                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3047                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3048                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3049                 </links>
3050                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3051                         <actions>
3052                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3053                                 <retrieve />
3054                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3055                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3056                         </actions>
3057                 </permacrud>
3058         </class>
3059         
3060         <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">
3061                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3062                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3063                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3064                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3065                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3066                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3067                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3068                 </fields>
3069                 <links>
3070                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3071                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3072                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3073                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3074                 </links>
3075                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3076                         <actions>
3077                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3078                                 <retrieve />
3079                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3080                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3081                         </actions>
3082                 </permacrud>
3083         </class>
3084         
3085         <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">
3086                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3087                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3088                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3089                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3090                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3091                 </fields>
3092                 <links>
3093                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3094                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3095                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3096                 </links>
3097                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3098                         <actions>
3099                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3100                                 <retrieve />
3101                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3102                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3103                         </actions>
3104                 </permacrud>
3105         </class>
3106         
3107         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3108                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3109                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3110                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3111                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3112                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3113                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3114                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3115                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3116                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3117                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3118                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3119                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3120                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3121                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3122                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3123                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3124                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3125                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3126                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3127                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3128                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3129                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3130                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3131                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3132                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3133                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3134                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3135                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3136                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3137                 </fields>
3138                 <links>
3139                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3140                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3141                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3142                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3143                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3144                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3145                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3146                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3147                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3148                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3149                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3150                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3151                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3152                 </links>
3153                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3154                         <actions>
3155                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3156                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3157                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3158                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3159                         </actions>
3160                 </permacrud>
3161         </class>
3162         
3163         <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">
3164                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3165                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3166                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3167                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3168                 </fields>
3169                 <links>
3170                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3171                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3172                 </links>
3173                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3174                         <actions>
3175                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3176                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3177                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3178                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3179                         </actions>
3180                 </permacrud>
3181         </class>
3182
3183         <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">
3184                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3185                         <field name="bucket" reporter:datatype="link"/>
3186                         <field name="id" reporter:datatype="id" />
3187                         <field name="target_call_number" reporter:datatype="link" />
3188                         <field name="create_time" reporter:datatype="timestamp" />
3189                         <field name="pos" reporter:datatype="int" />
3190                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3191                 </fields>
3192                 <links>
3193                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3194                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3195             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3196                 </links>
3197         </class>
3198         <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">
3199                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3200                         <field name="id" reporter:datatype="id" />
3201                         <field name="item" reporter:datatype="link"/>
3202                         <field name="note" reporter:datatype="text" />
3203                 </fields>
3204                 <links>
3205                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3206                 </links>
3207         </class>
3208         <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">
3209                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3210                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3211                         <field name="btype" reporter:datatype="text"/>
3212                         <field name="id" reporter:datatype="id" />
3213                         <field name="name" reporter:datatype="text"/>
3214                         <field name="owner" reporter:datatype="link"/>
3215                         <field name="pub" reporter:datatype="bool"/>
3216                         <field name="create_time" reporter:datatype="timestamp" />
3217                 </fields>
3218                 <links>
3219                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3220                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3221                 </links>
3222         </class>
3223         <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">
3224                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3225                         <field name="id" reporter:datatype="id" />
3226                         <field name="bucket" reporter:datatype="link"/>
3227                         <field name="note" reporter:datatype="text" />
3228                 </fields>
3229                 <links>
3230                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3231                 </links>
3232         </class>
3233         <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">
3234                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3235                         <field name="hold" reporter:datatype="link"/>
3236                         <field name="id" reporter:datatype="id" />
3237                         <field name="target_copy" reporter:datatype="link"/>
3238                 </fields>
3239                 <links>
3240                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3241                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3242                 </links>
3243         </class>
3244         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3245                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3246                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3247                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3248                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3249                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3250                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3251                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3252                 </fields>
3253                 <links>
3254                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3255                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3256                 </links>
3257         </class>
3258         <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">
3259                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3260                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3261                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3262                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3263                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3264                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3265                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3266                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3267                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3268                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3269                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3270                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3271                 </fields>
3272                 <links>
3273                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3274                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3275                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3276                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3277                 </links>
3278         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3279             <actions>
3280                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3281                 <retrieve/>
3282                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3283                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3284             </actions>
3285         </permacrud>
3286         </class>
3287
3288     <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">
3289         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3290             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3291             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3292             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3293             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3294         </fields>
3295         <links>
3296             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3297             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3298         </links>
3299         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3300             <actions>
3301                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3302                 <retrieve/>
3303                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3304                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3305             </actions>
3306         </permacrud>
3307     </class>
3308
3309         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
3310                 <fields>
3311                         <field name="sre_id" oils_persist:virtual="true" />
3312                         <field name="location" oils_persist:virtual="true" />
3313                         <field name="owning_lib" oils_persist:virtual="true" />
3314                         <field name="basic_holdings" oils_persist:virtual="true" />
3315                         <field name="basic_holdings_add" oils_persist:virtual="true" />
3316                         <field name="supplement_holdings" oils_persist:virtual="true" />
3317                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
3318                         <field name="index_holdings" oils_persist:virtual="true" />
3319                         <field name="index_holdings_add" oils_persist:virtual="true" />
3320                         <field name="online" oils_persist:virtual="true" />
3321                         <field name="missing" oils_persist:virtual="true" />
3322                         <field name="incomplete" oils_persist:virtual="true" />
3323                 </fields>
3324         </class>
3325
3326         <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">
3327                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3328                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3329                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3330                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3331                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3332                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3333                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3334                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3335                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3336                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3337                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3338                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3339                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3340                 </fields>
3341                 <links>
3342                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3343                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3344                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3345                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3346                 </links>
3347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3348                         <actions>
3349                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3350                                 <retrieve/>
3351                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3352                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3353                         </actions>
3354                 </permacrud>
3355         </class>
3356
3357         <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">
3358                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3359                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3360                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3361                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3362                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3363                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3364                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3365                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3366                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3367                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3368                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3369                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3370                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3371                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3372                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3373                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3374                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3375                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3376                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3377                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3378                 </fields>
3379                 <links>
3380                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3381                 </links>
3382                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3383                         <actions>
3384                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
3385                                         <context link="subscription" field="owning_lib" />
3386                                 </create>
3387                                 <retrieve />
3388                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
3389                                         <context link="subscription" field="owning_lib" />
3390                                 </update>
3391                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
3392                                         <context link="subscription" field="owning_lib" />
3393                                 </delete>
3394                         </actions>
3395                 </permacrud>
3396         </class>
3397
3398         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3399                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3400                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3401                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
3402                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3403                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3404                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3405                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3406                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3407                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3408                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
3409                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3410                 </fields>
3411                 <links>
3412                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3413                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3414                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
3415                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
3416                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
3417                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
3418                 </links>
3419                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3420                         <actions>
3421                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3422                                 <retrieve />
3423                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3424                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3425                         </actions>
3426                 </permacrud>
3427         </class>
3428
3429         <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">
3430                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
3431                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3432                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3433                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3434                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3435                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3436                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3437                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3438                 </fields>
3439                 <links>
3440                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3441                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3442                 </links>
3443                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3444                 </permacrud>
3445         </class>
3446
3447         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3448                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3449                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3450                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3451                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3452                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
3453                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3454                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3455                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3456                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3457                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3458                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
3459                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3460                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3461                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3462                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3463                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3464                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3465                 </fields>
3466                 <links>
3467                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3468                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3469                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3470                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3471                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3472                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3473                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3474                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
3475                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
3476                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
3477                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
3478                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
3479                 </links>
3480                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3481                         <actions>
3482                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3483                                 <retrieve />
3484                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3485                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3486                         </actions>
3487                 </permacrud>
3488         </class>
3489
3490         <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">
3491                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
3492                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3493                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3494                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3495                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3496                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3497                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3498                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3499                 </fields>
3500                 <links>
3501                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3502                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3503                 </links>
3504                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3505                         <actions>
3506                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3507                                         <context link="distribution" field="holding_lib" />
3508                                 </create>
3509                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
3510                                         <context link="distribution" field="holding_lib" />
3511                                 </retrieve>
3512                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3513                                         <context link="distribution" field="holding_lib" />
3514                                 </update>
3515                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
3516                                         <context link="distribution" field="holding_lib" />
3517                                 </delete>
3518                         </actions>
3519                 </permacrud>
3520         </class>
3521
3522         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3523                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3524                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3525                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3526                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3527                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3528                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
3529                 </fields>
3530                 <links>
3531                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3532                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3533                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
3534                 </links>
3535                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3536                         <actions>
3537                                 <create permission="ADMIN_SERIAL_STREAM">
3538                                         <context link="distribution" field="holding_lib" />
3539                                 </create>
3540                                 <retrieve />
3541                                 <update permission="ADMIN_SERIAL_STREAM">
3542                                         <context link="distribution" field="holding_lib" />
3543                                 </update>
3544                                 <delete permission="ADMIN_SERIAL_STREAM">
3545                                         <context link="distribution" field="holding_lib" />
3546                                 </delete>
3547                         </actions>
3548                 </permacrud>
3549         </class>
3550
3551         <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">
3552                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
3553                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3554                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3555                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3556                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
3557                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
3558                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3559                 </fields>
3560                 <links>
3561                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3562                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
3563                 </links>
3564                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3565                         <actions>
3566                                 <create permission="ADMIN_SERIAL_STREAM">
3567                                         <context link="stream" jump="distribution" field="holding_lib" />
3568                                 </create>
3569                                 <retrieve permission="RECEIVE_SERIAL">
3570                                         <context link="stream" jump="distribution" field="holding_lib" />
3571                                 </retrieve>
3572                                 <update permission="ADMIN_SERIAL_STREAM">
3573                                         <context link="stream" jump="distribution" field="holding_lib" />
3574                                 </update>
3575                                 <delete permission="ADMIN_SERIAL_STREAM">
3576                                         <context link="stream" jump="distribution" field="holding_lib" />
3577                                 </delete>
3578                         </actions>
3579                 </permacrud>
3580         </class>
3581
3582         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
3583                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
3584                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3585                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3586                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3587                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3588                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3589                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3590                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
3591                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3592                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
3593                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
3594                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
3595                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
3596                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3597                 </fields>
3598                 <links>
3599                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3600                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3601                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3602                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
3603                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
3604                 </links>
3605                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3606                         <actions>
3607                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
3608                                         <context link="subscription" field="owning_lib" />
3609                                 </create>
3610                                 <retrieve/>
3611                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
3612                                         <context link="subscription" field="owning_lib" />
3613                                 </update>
3614                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
3615                                         <context link="subscription" field="owning_lib" />
3616                                 </delete>
3617                         </actions>
3618                 </permacrud>
3619         </class>
3620
3621         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
3622                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3623                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3624                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3625                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3626                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3627                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3628                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3629                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3630                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3631                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3632                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3633                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3634                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3635                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3636                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3637                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3638                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3639                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3640                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3641                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3642                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3643                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3644                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3645                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3646                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3647                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3648                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3649                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3650                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3651                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3652                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3653                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3654                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
3655                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
3656                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
3657                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
3658                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3659                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3660                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3661                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3662                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3663                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3664                 </fields>
3665                 <links>
3666                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3667                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3668                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3669                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3670                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3671                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3672                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3673                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3674                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3675                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3676                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3677                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3678                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3679                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3680                 </links>
3681                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3682                         <actions>
3683                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3684                                 <retrieve/>
3685                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3686                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
3687                         </actions>
3688                 </permacrud>
3689         </class>
3690
3691         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
3692                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
3693                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3694                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3695                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3696                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3697                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
3698                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
3699                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3700                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
3701                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
3702                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
3703                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
3704                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
3705                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3706                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
3707                 </fields>
3708                 <links>
3709                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3710                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3711                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
3712                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3713                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
3714                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3715                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
3716                 </links>
3717                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3718                         <actions>
3719                                 <create permission="ADMIN_SERIAL_ITEM">
3720                                         <context link="stream" jump="distribution" field="holding_lib" />
3721                                 </create>
3722                                 <retrieve permission="ADMIN_SERIAL_ITEM">
3723                                         <context link="stream" jump="distribution" field="holding_lib" />
3724                                 </retrieve>
3725                                 <update permission="ADMIN_SERIAL_ITEM">
3726                                         <context link="stream" jump="distribution" field="holding_lib" />
3727                                 </update>
3728                                 <delete permission="ADMIN_SERIAL_ITEM">
3729                                         <context link="stream" jump="distribution" field="holding_lib" />
3730                                 </delete>
3731                         </actions>
3732                 </permacrud>
3733         </class>
3734
3735         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
3736                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
3737                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3738                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
3739                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3740                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3741                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3742                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3743                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3744                 </fields>
3745                 <links>
3746                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
3747                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3748                 </links>
3749                 <!-- Not available via PCRUD at this time -->
3750         </class>
3751
3752         <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">
3753                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
3754                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3755                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3756                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
3757                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
3758                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
3759                 </fields>
3760                 <links>
3761                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3762                 </links>
3763                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3764                         <actions>
3765                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3766                                         <context link="distribution" field="holding_lib" />
3767                                 </create>
3768                                 <retrieve/>
3769                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3770                                         <context link="distribution" field="holding_lib" />
3771                                 </update>
3772                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3773                                         <context link="distribution" field="holding_lib" />
3774                                 </create>
3775                         </actions>
3776                 </permacrud>
3777         </class>
3778
3779         <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">
3780                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
3781                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3782                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3783                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
3784                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
3785                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
3786                 </fields>
3787                 <links>
3788                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3789                 </links>
3790                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3791                         <actions>
3792                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3793                                         <context link="distribution" field="holding_lib" />
3794                                 </create>
3795                                 <retrieve/>
3796                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3797                                         <context link="distribution" field="holding_lib" />
3798                                 </update>
3799                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3800                                         <context link="distribution" field="holding_lib" />
3801                                 </create>
3802                         </actions>
3803                 </permacrud>
3804         </class>
3805
3806         <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">
3807                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
3808                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3809                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3810                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
3811                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
3812                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
3813                 </fields>
3814                 <links>
3815                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3816                 </links>
3817                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3818                         <actions>
3819                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3820                                         <context link="distribution" field="holding_lib" />
3821                                 </create>
3822                                 <retrieve/>
3823                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3824                                         <context link="distribution" field="holding_lib" />
3825                                 </update>
3826                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3827                                         <context link="distribution" field="holding_lib" />
3828                                 </create>
3829                         </actions>
3830                 </permacrud>
3831         </class>
3832
3833         <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">
3834                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
3835                         <field name="id" reporter:datatype="id" />
3836                         <field name="owning_copy" reporter:datatype="link"/>
3837                         <field name="stat_cat" reporter:datatype="link"/>
3838                         <field name="stat_cat_entry" reporter:datatype="link"/>
3839                 </fields>
3840                 <links>
3841                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3842                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
3843                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
3844                 </links>
3845         </class>
3846         <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">
3847                 <fields oils_persist:primary="code">
3848                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3849                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3850                 </fields>
3851                 <links/>
3852         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3853             <actions>
3854                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3855                 <retrieve/>
3856                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3857                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3858             </actions>
3859         </permacrud>
3860         </class>
3861         <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">
3862                 <fields oils_persist:primary="code">
3863                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
3864                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3865                 </fields>
3866                 <links/>
3867         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3868             <actions>
3869                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3870                 <retrieve/>
3871                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3872                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3873             </actions>
3874         </permacrud>
3875         </class>
3876         <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">
3877                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
3878                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
3879                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
3880                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
3881                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
3882                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
3883                 </fields>
3884                 <links>
3885             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3886         </links>
3887         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3888             <actions>
3889                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3890                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3891                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3892                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
3893             </actions>
3894         </permacrud>
3895         </class>
3896         <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">
3897                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
3898                         <field name="id" reporter:datatype="id" />
3899                         <field name="name" reporter:datatype="text"/>
3900                 </fields>
3901                 <links/>
3902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3903             <actions>
3904                 <create permission="CREATE_LASSO" global_required="true"/>
3905                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
3906                 <update permission="UPDATE_LASSO" global_required="true"/>
3907                 <delete permission="DELETE_LASSO" global_required="true"/>
3908             </actions>
3909         </permacrud>
3910         </class>
3911         <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">
3912                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
3913                         <field name="id" reporter:datatype="id" />
3914                         <field name="lasso" reporter:datatype="link"/>
3915                         <field name="org_unit" reporter:datatype="org_unit"/>
3916                 </fields>
3917                 <links>
3918                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
3919                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3920                 </links>
3921         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3922             <actions>
3923                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
3924                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
3925                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
3926                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
3927             </actions>
3928         </permacrud>
3929         </class>
3930         <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">
3931                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3932                         <field name="id" reporter:datatype="id" />
3933                         <field name="from_org" reporter:datatype="org_unit"/>
3934                         <field name="to_org" reporter:datatype="org_unit"/>
3935                         <field name="prox" reporter:datatype="int" />
3936                 </fields>
3937                 <links>
3938                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
3939                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
3940                 </links>
3941         </class>
3942         <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">
3943                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
3944                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3945                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
3946                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
3947                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
3948                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
3949                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
3950                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
3951                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
3952                 </fields>
3953                 <links/>
3954         </class>
3955         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
3956                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
3957                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
3958                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3959                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
3960                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
3961                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
3962                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3963                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
3964                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3965                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
3966                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
3967                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
3968                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
3969                 </fields>
3970                 <links>
3971                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3972                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
3973                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
3974                 </links>
3975         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3976             <actions>
3977                 <create permission="ADMIN_SURVEY" context_field="owner"/>
3978                 <retrieve/>
3979                 <update permission="ADMIN_SURVEY" context_field="owner"/>
3980                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
3981             </actions>
3982         </permacrud>
3983         </class>
3984         <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">
3985                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
3986                         <field name="address_type"  reporter:datatype="text"/>
3987                         <field name="city"  reporter:datatype="text"/>
3988                         <field name="country"  reporter:datatype="text"/>
3989                         <field name="county"  reporter:datatype="text"/>
3990                         <field name="id" reporter:datatype="id" />
3991                         <field name="org_unit" reporter:datatype="org_unit"/>
3992                         <field name="post_code"  reporter:datatype="text"/>
3993                         <field name="state"  reporter:datatype="text"/>
3994                         <field name="street1"  reporter:datatype="text"/>
3995                         <field name="street2"  reporter:datatype="text"/>
3996                         <field name="valid" reporter:datatype="bool"/>
3997                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
3998                 </fields>
3999                 <links>
4000                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4001                 </links>
4002         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4003             <actions>
4004                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4005                 <retrieve/>
4006                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4007                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4008             </actions>
4009         </permacrud>
4010         </class>
4011         <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">
4012                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4013                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4014                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4015                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4016                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4017                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4018                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4019                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4020                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4021                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4022                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4023                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4024                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4025                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4026                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4027                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4028                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4029                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4030                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4031                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4032                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4033                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4034                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4035                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4036                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4037                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4038                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4039                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4040                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4041                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4042                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4043                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4044                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4045                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4046                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4047                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4048                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4049                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4050                 </fields>
4051                 <links>
4052                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4053                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4054                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4055                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4056                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4057                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4058                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4059                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4060                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4061                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4062                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4063                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4064                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4065                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4066                 </links>
4067         </class>
4068         <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">
4069                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4070                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4071                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4072                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4073                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4074                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4075                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4076                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4077                 </fields>
4078                 <links>
4079                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4080                 </links>
4081                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4082                         <actions>
4083                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4084                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4085                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4086                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4087                         </actions>
4088                 </permacrud>
4089         </class>
4090         <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">
4091                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4092                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4093                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4094                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4095                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4096                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4097                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4098                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4099                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4100                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4101                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4102                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4103                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4104                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4105                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4106                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4107                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4108                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4109                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4110                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4111                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4112                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4113                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4114                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4115                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4116                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4117                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4118                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4119                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4120                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4121                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4122                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4123                 </fields>
4124                 <links>
4125                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4126                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4127                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4128                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4129                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4130                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4131                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4132                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4133                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4134                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4135                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4136                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4137                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4138                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4139                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4140                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4141                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4142                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4143                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4144                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4145                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4146                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4147                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4148                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4149                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4150                 </links>
4151         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4152             <actions>
4153                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4154                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4155                     <context field="id"/>
4156                     <context field="parent_ou"/>
4157                                 </retrieve>
4158                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4159                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4160             </actions>
4161         </permacrud>
4162         </class>
4163         <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">
4164                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4165                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4166                         <field name="btype" reporter:datatype="text"/>
4167                         <field name="id" reporter:datatype="id" />
4168                         <field name="name"  reporter:datatype="text"/>
4169                         <field name="owner" reporter:datatype="link"/>
4170                         <field name="pub" reporter:datatype="bool"/>
4171                         <field name="create_time" reporter:datatype="timestamp" />
4172                 </fields>
4173                 <links>
4174                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4175                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4176                 </links>
4177         </class>
4178         <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">
4179                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4180                         <field name="id" reporter:datatype="id" />
4181                         <field name="bucket" reporter:datatype="link"/>
4182                         <field name="note" reporter:datatype="text" />
4183                 </fields>
4184                 <links>
4185                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4186                 </links>
4187         </class>
4188         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4189                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4190                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4191                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4192                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4193                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4194                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4195                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4196                 </fields>
4197                 <links>
4198                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4199                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4200                 </links>
4201         </class>
4202         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4203                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4204                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4205                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4206                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4207                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4208                 </fields>
4209                 <links>
4210                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4211                 </links>
4212         </class>
4213         <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">
4214                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4215                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4216                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4217                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4218                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4219                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4220                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
4221                 </fields>
4222                 <links>
4223                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4224                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
4225                 </links>
4226         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4227             <actions>
4228                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
4229                 <retrieve />
4230                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
4231                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
4232             </actions>
4233         </permacrud>
4234         </class>
4235         <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">
4236                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
4237                         <field name="field" reporter:datatype="link"/>
4238                         <field name="id" reporter:datatype="id" />
4239                         <field name="source" reporter:datatype="link"/>
4240                         <field name="value"  reporter:datatype="text"/>
4241                 </fields>
4242                 <links>
4243                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4244                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4245                 </links>
4246         </class>
4247         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
4248                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
4249                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4250                         <field name="btype" reporter:datatype="text"/>
4251                         <field name="id" reporter:datatype="id" />
4252                         <field name="name"  reporter:datatype="text"/>
4253                         <field name="owner" reporter:datatype="link"/>
4254                         <field name="pub" reporter:datatype="bool"/>
4255                         <field name="create_time" reporter:datatype="timestamp" />
4256                 </fields>
4257                 <links>
4258                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4259                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
4260                 </links>
4261         </class>
4262         <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">
4263                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
4264                         <field name="id" reporter:datatype="id" />
4265                         <field name="bucket" reporter:datatype="link"/>
4266                         <field name="note" reporter:datatype="text" />
4267                 </fields>
4268                 <links>
4269                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4270                 </links>
4271         </class>
4272         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
4273                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4274                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4275                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4276                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4277                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
4278                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
4279                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4280                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4281                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4282                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4283                 </fields>
4284                 <links>
4285                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4286                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4287                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4288                 </links>
4289         </class>
4290         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
4291                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
4292                         <field name="id" reporter:datatype="id" />
4293                         <field name="ind1" />
4294                         <field name="ind2" />
4295                         <field name="record" />
4296                         <field name="subfield" />
4297                         <field name="tag" />
4298                         <field name="value" />
4299                 </fields>
4300                 <links>
4301                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4302                 </links>
4303         </class>
4304         <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">
4305                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
4306                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
4307                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4308                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
4309                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4310                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
4311                 </fields>
4312                 <links>
4313                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4314                 </links>
4315         </class>
4316         <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">
4317                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
4318                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4319                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
4320                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
4321                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
4322                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4323                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4324                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
4325                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
4326                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
4327                 </fields>
4328                 <links>
4329                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
4330                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
4331                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
4332                 </links>
4333         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4334             <actions>
4335                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
4336                 <retrieve/>
4337                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
4338                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
4339             </actions>
4340         </permacrud>
4341         </class>
4342         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
4343                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
4344                         <field name="create_date" reporter:datatype="timestamp"/>
4345                         <field name="creator" reporter:datatype="link"/>
4346                         <field name="edit_date" reporter:datatype="timestamp"/>
4347                         <field name="editor" reporter:datatype="link"/>
4348                         <field name="id" reporter:datatype="id" />
4349                         <field name="pub" reporter:datatype="bool"/>
4350                         <field name="record" reporter:datatype="link"/>
4351                         <field name="value"  reporter:datatype="text"/>
4352                 </fields>
4353                 <links>
4354                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4355                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4356                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4357                 </links>
4358         </class>
4359         <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">
4360                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4361                         <field name="balance_owed" reporter:datatype="money" />
4362                         <field name="total_owed" reporter:datatype="money" />
4363                         <field name="total_paid" reporter:datatype="money" />
4364                         <field name="usr" reporter:datatype="link"/>
4365                 </fields>
4366                 <links>
4367                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4368                 </links>
4369         </class>
4370         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
4371                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4372                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
4373                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4374                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
4375                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4376                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
4377                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
4378                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4379                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4380                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4381                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4382                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4383                 </fields>
4384                 <links>
4385                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4386                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4387                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4388                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4389                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4390                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4391                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4392                 </links>
4393         </class>
4394         <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">
4395                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
4396                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
4397                         <field name="quality" reporter:datatype="int" />
4398                         <field name="source" reporter:datatype="text"/>
4399                         <field name="transcendant" reporter:datatype="bool"/>
4400                 </fields>
4401                 <links/>
4402         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4403             <actions>
4404                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
4405                 <retrieve/>
4406                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
4407                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
4408             </actions>
4409         </permacrud>
4410         </class>
4411         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
4412                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4413                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4414                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4415                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4416                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4417                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4418                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
4419                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4420                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4421                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4422                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4423                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4424                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4425                 </fields>
4426                 <links>
4427                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4428                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4429                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4430                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4431                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4432                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4433                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4434                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4435                 </links>
4436         </class>
4437         <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">
4438                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
4439                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4440                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4441                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4442                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
4443                 </fields>
4444                 <links>
4445                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4446                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4447                 </links>
4448         </class>
4449         <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">
4450                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
4451                         <field name="bucket" reporter:datatype="link"/>
4452                         <field name="id" reporter:datatype="id" />
4453                         <field name="target_user" reporter:datatype="link"/>
4454                         <field name="create_time" reporter:datatype="timestamp" />
4455                         <field name="pos" reporter:datatype="int" />
4456                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4457                 </fields>
4458                 <links>
4459                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
4460                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4461             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
4462                 </links>
4463         </class>
4464         <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">
4465                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
4466                         <field name="id" reporter:datatype="id" />
4467                         <field name="item" reporter:datatype="link"/>
4468                         <field name="note" reporter:datatype="text" />
4469                 </fields>
4470                 <links>
4471                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
4472                 </links>
4473         </class>
4474         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
4475                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4476                         <field name="balance_owed" reporter:datatype="money" />
4477                         <field name="total_owed" reporter:datatype="money" />
4478                         <field name="total_paid" reporter:datatype="money" />
4479                         <field name="usr" reporter:datatype="link"/>
4480                 </fields>
4481                 <links>
4482                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4483                 </links>
4484         </class>
4485         <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">
4486                 <fields oils_persist:primary="code" oils_persist:sequence="">
4487                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
4488                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4489                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4490                 </fields>
4491                 <links/>
4492         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4493             <actions>
4494                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4495                 <retrieve/>
4496                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4497                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4498             </actions>
4499         </permacrud>
4500         </class>
4501         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
4502                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4503                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4504                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4505                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4506                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4507                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4508                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4509                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4510                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4511                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4512                 </fields>
4513                 <links>
4514                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4515                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4516                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4517                 </links>
4518         </class>
4519         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
4520                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4521                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4522                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4523                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4524                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4525                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4526                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4527                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4528                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4529                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4530                 </fields>
4531                 <links>
4532                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4533                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4534                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4535                 </links>
4536         </class>
4537         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
4538                 <fields oils_persist:primary="id" oils_persist:sequence="">
4539                         <field name="checkin_lib" reporter:datatype="link"/>
4540                         <field name="checkin_staff" reporter:datatype="link"/>
4541                         <field name="checkin_time" reporter:datatype="timestamp"/>
4542                         <field name="circ_lib"  reporter:datatype="org_unit"/>
4543                         <field name="circ_staff" reporter:datatype="link"/>
4544                         <field name="desk_renewal" reporter:datatype="bool"/>
4545                         <field name="due_date" reporter:datatype="timestamp"/>
4546                         <field name="duration" reporter:datatype="interval"/>
4547                         <field name="duration_rule" reporter:datatype="link"/>
4548                         <field name="fine_interval" reporter:datatype="interval"/>
4549                         <field name="id" reporter:datatype="id" />
4550                         <field name="max_fine" reporter:datatype="money" />
4551                         <field name="max_fine_rule" reporter:datatype="link"/>
4552                         <field name="opac_renewal" reporter:datatype="bool"/>
4553                         <field name="phone_renewal" reporter:datatype="bool"/>
4554                         <field name="recurring_fine" reporter:datatype="money" />
4555                         <field name="recurring_fine_rule" reporter:datatype="link"/>
4556                         <field name="renewal_remaining" reporter:datatype="int" />
4557                         <field name="stop_fines" reporter:datatype="text"/>
4558                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
4559                         <field name="target_copy" reporter:datatype="link"/>
4560                         <field name="usr" reporter:datatype="link"/>
4561                         <field name="xact_finish" reporter:datatype="timestamp" />
4562                         <field name="xact_start" reporter:datatype="timestamp" />
4563                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4564                 </fields>
4565                 <links>
4566                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4567                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4568                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4569                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4570                 </links>
4571         </class>
4572         <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">
4573                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
4574                         <field name="field" reporter:datatype="link"/>
4575                         <field name="id" reporter:datatype="id" />
4576                         <field name="source" reporter:datatype="link"/>
4577                         <field name="value" reporter:datatype="text"/>
4578                 </fields>
4579                 <links>
4580                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4581                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4582                 </links>
4583         </class>
4584         <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">
4585                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
4586                         <field name="high" reporter:datatype="money" />
4587                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4588                         <field name="low" reporter:datatype="money" />
4589                         <field name="name" reporter:datatype="text"/>
4590                         <field name="normal" reporter:datatype="money" />
4591                         <field name="recurrence_interval" reporter:datatype="interval"/>
4592                 </fields>
4593                 <links/>
4594         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4595             <actions>
4596                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4597                 <retrieve/>
4598                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4599                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
4600             </actions>
4601         </permacrud>
4602         </class>
4603         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
4604                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4605                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4606                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4607                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4608                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
4609                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
4610                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4611                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4612                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4613                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
4614                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4615                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4616                 </fields>
4617                 <links>
4618                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4619                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4620                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4621                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4622                 </links>
4623         </class>
4624         <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">
4625                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4626                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4627                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4628                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4629                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4630                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4631                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4632                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4633                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4634                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4635                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4636                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4637                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4638                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4639                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4640                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4641                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4642                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4643                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4644                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4645                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4646                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4647                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
4648                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4649                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4650                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4651                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4652                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4653                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4654                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4655                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4656                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4657                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4658                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4659                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4660                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4661                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4662                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4663                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4664                 </fields>
4665                 <links>
4666                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4667                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4668                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4669                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4670                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4671                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4672                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4673                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4674                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4675                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4676                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4677                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4678                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4679                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4680                 </links>
4681         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4682             <actions>
4683                 <create permission="CREATE_COPY">
4684                     <context link="call_number" field="owning_lib"/>
4685                 </create>
4686                 <retrieve/>
4687                 <update permission="UPDATE_COPY">
4688                     <context link="call_number" field="owning_lib"/>
4689                 </update>
4690                 <delete permission="DELETE_COPY">
4691                     <context link="call_number" field="owning_lib"/>
4692                 </delete>
4693             </actions>
4694         </permacrud>
4695         </class>
4696
4697         <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">
4698                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
4699                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
4700                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
4701                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4702                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4703                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4704                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4705                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4706                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
4707                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
4708                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
4709                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4710                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4711                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
4712                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
4713                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
4714                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
4715                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
4716                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4717                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
4718                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
4719                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
4720                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4721                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4722                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
4723                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
4724                 </fields>
4725                 <links>
4726                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4727                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4728                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4729                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4730                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4731                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4732                 </links>
4733                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4734                         <actions>
4735                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
4736                                 <retrieve />
4737                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
4738                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
4739                         </actions>
4740                 </permacrud>
4741         </class>
4742
4743         <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">
4744                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
4745                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
4746                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4747                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
4748                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
4749                 </fields>
4750                 <links/>
4751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4752             <actions>
4753                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4754                 <retrieve/>
4755                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4756                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
4757             </actions>
4758         </permacrud>
4759         </class>
4760         <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">
4761                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
4762                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
4763                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4764                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
4765                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
4766                 </fields>
4767                 <links/>
4768         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4769             <actions>
4770                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4771                 <retrieve/>
4772                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4773                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
4774             </actions>
4775         </permacrud>
4776         </class>
4777         <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">
4778                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
4779                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4780                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4781                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4782                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4783                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
4784                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
4785                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
4786                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
4787                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
4788                 </fields>
4789                 <links>
4790                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
4791                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
4792                 </links>
4793         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4794             <actions>
4795                 <create permission="CREATE_PERM" global_required="true"/>
4796                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
4797                 <update permission="UPDATE_PERM" global_required="true"/>
4798                 <delete permission="DELETE_PERM" global_required="true"/>
4799             </actions>
4800         </permacrud>
4801         </class>
4802         <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">
4803                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
4804                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4805                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
4806                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
4807                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
4808                 </fields>
4809                 <links>
4810                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
4811                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
4812                 </links>
4813         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4814             <actions>
4815                 <create permission="ADMIN_SURVEY">
4816                     <context link="question" jump="survey" field="owner"/>
4817                 </create>
4818                 <retrieve/>
4819                 <update permission="ADMIN_SURVEY">
4820                     <context link="question" jump="survey" field="owner"/>
4821                 </update>
4822                 <delete permission="ADMIN_SURVEY">
4823                     <context link="question" jump="survey" field="owner"/>
4824                 </delete>
4825             </actions>
4826         </permacrud>
4827         </class>
4828         <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">
4829                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
4830                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4831                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
4832                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
4833                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
4834                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
4835                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
4836                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
4837                 </fields>
4838                 <links>
4839                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
4840                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4841                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
4842                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4843                 </links>
4844         </class>
4845         <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">
4846                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4847                         <field name="balance_owed" reporter:datatype="money" />
4848                         <field name="total_owed" reporter:datatype="money" />
4849                         <field name="total_paid" reporter:datatype="money" />
4850                         <field name="usr" reporter:datatype="link"/>
4851                 </fields>
4852                 <links>
4853                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4854                 </links>
4855         </class>
4856         <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">
4857                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
4858                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
4859                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
4860                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
4861                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4862                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
4863                 </fields>
4864                 <links>
4865                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4866                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4867                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4868                 </links>
4869         </class>
4870         <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">
4871                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
4872                         <field name="field" reporter:datatype="link"/>
4873                         <field name="id" reporter:datatype="id" />
4874                         <field name="source" reporter:datatype="link"/>
4875                         <field name="value" reporter:datatype="text"/>
4876                 </fields>
4877                 <links>
4878                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4879                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4880                 </links>
4881         </class>
4882         <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">
4883                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
4884                         <field name="field" reporter:datatype="link"/>
4885                         <field name="id" reporter:datatype="id" />
4886                         <field name="source" reporter:datatype="link"/>
4887                         <field name="value" reporter:datatype="text"/>
4888                 </fields>
4889                 <links>
4890                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4891                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4892                 </links>
4893         </class>
4894         <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">
4895                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
4896                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4897                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
4898                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
4899                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
4900                 </fields>
4901                 <links>
4902                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
4903                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4904                 </links>
4905         </class>
4906         <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">
4907                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
4908                         <field name="depth" reporter:datatype="int" />
4909                         <field name="grantable" reporter:datatype="bool"/>
4910                         <field name="grp" reporter:datatype="link"/>
4911                         <field name="id" reporter:datatype="id" />
4912                         <field name="perm" reporter:datatype="link"/>
4913                 </fields>
4914                 <links>
4915                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4916                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4917                 </links>
4918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4919             <actions>
4920                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
4921                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
4922                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
4923                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
4924             </actions>
4925         </permacrud>
4926         </class>
4927         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
4928                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
4929                         <field name="items" oils_persist:virtual="true" />
4930                         <field name="btype" reporter:datatype="text"/>
4931                         <field name="id" reporter:datatype="id" />
4932                         <field name="name" reporter:datatype="text"/>
4933                         <field name="owner" reporter:datatype="link"/>
4934                         <field name="pub" reporter:datatype="bool"/>
4935                         <field name="create_time" reporter:datatype="timestamp" />
4936                 </fields>
4937                 <links>
4938                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4939                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
4940                 </links>
4941         </class>
4942         <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">
4943                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
4944                         <field name="id" reporter:datatype="id" />
4945                         <field name="bucket" reporter:datatype="link"/>
4946                         <field name="note" reporter:datatype="text" />
4947                 </fields>
4948                 <links>
4949                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
4950                 </links>
4951         </class>
4952         <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">
4953                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
4954                         <field name="id" reporter:datatype="int" />
4955                         <field name="usr" reporter:datatype="link"/>
4956                         <field name="work_ou" reporter:datatype="link"/>
4957                 </fields>
4958                 <links>
4959                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4960                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
4961                 </links>
4962         </class>
4963         <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">
4964                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
4965                         <field name="depth" reporter:datatype="int"/>
4966                         <field name="grantable" reporter:datatype="bool"/>
4967                         <field name="id" reporter:datatype="id" />
4968                         <field name="perm" reporter:datatype="link"/>
4969                         <field name="usr" reporter:datatype="link"/>
4970                 </fields>
4971                 <links>
4972                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4973                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4974                 </links>
4975         </class>
4976         <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">
4977                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
4978                         <field name="object_id" reporter:datatype="text"/>
4979                         <field name="grantable" reporter:datatype="bool"/>
4980                         <field name="id" reporter:datatype="id" />
4981                         <field name="perm" reporter:datatype="link"/>
4982                         <field name="usr" reporter:datatype="link"/>
4983                         <field name="object_type" reporter:datatype="text"/>
4984                 </fields>
4985                 <links>
4986                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4987                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
4988                 </links>
4989         </class>
4990         <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">
4991                 <fields oils_persist:primary="id" oils_persist:sequence="">
4992                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4993                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4994                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4995                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4996                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4997                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4998                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4999                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5000                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5001                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5002                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5003                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5004                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5005                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5006                 </fields>
5007                 <links>
5008                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5009                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5010                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5011                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5012                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5013                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5014                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5015                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5016                 </links>
5017         </class>
5018         <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">
5019                 <fields oils_persist:primary="id" oils_persist:sequence="">
5020                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5021                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5022                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5023                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5024                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5025                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5026                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5027                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5028                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5029                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5030                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5031                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5032                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5033                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5034                 </fields>
5035                 <links>
5036                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5037                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5038                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5039                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5040                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5041                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5042                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5043                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5044                 </links>
5045         </class>
5046         <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">
5047                 <fields oils_persist:primary="id" oils_persist:sequence="">
5048                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5049                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5050                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5051                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5052                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5053                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5054                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5055                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5056                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5057                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5058                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5059                 </fields>
5060                 <links>
5061                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5062                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5063                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5064                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5065                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5066                 </links>
5067         </class>
5068         <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">
5069                 <fields oils_persist:primary="id" oils_persist:sequence="">
5070                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5071                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5072                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5073                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5074                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5075                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5076                         <field reporter:label="Accepting User" name="accepting_usr" />
5077                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5078                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5079                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5080                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5081                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5082                 </fields>
5083                 <links>
5084                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5085                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5086                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5087                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5088                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5089                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5090                 </links>
5091         </class>
5092         <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">
5093                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5094                         <field name="bucket" reporter:datatype="link"/>
5095                         <field name="id" reporter:datatype="id" />
5096                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5097                         <field name="create_time" reporter:datatype="timestamp" />
5098                         <field name="pos" reporter:datatype="int" />
5099                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5100                 </fields>
5101                 <links>
5102                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5103                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5104             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5105                 </links>
5106         </class>
5107         <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">
5108                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5109                         <field name="id" reporter:datatype="id" />
5110                         <field name="item" reporter:datatype="link"/>
5111                         <field name="note" reporter:datatype="text" />
5112                 </fields>
5113                 <links>
5114                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5115                 </links>
5116         </class>
5117         <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">
5118                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5119                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5120                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5121                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5122                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5123                 </fields>
5124                 <links>
5125                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5126                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5127                 </links>
5128         </class>
5129
5130         <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">
5131                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5132                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5133                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5134                 </fields>
5135                 <links/>
5136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5137             <actions>
5138                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5139                 <retrieve/>
5140                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5141                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5142             </actions>
5143         </permacrud>
5144         </class>
5145
5146
5147         <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">
5148                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5149                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5150                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5151                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5152                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5153                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5154                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5155                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5156                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5157                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5158                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5159                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5160                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5161                 </fields>
5162                 <links>
5163                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5164                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5165                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5166                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5167                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5168                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5169                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5170                 </links>
5171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5172             <actions>
5173                 <create permission="TRANSIT_COPY">
5174                     <context link="target_copy" field="owner"/>
5175                 </create>
5176                 <retrieve/>
5177                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5178                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5179             </actions>
5180         </permacrud>
5181         </class>
5182         <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">
5183                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5184                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5185                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5186                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5187                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
5188                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5189                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5190                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5191                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5192                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5193                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5194                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5195                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5196                 </fields>
5197                 <links>
5198                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5199                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5200                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5201                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5202                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5203                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5204                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5205                 </links>
5206         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5207             <actions>
5208                 <create permission="TRANSIT_COPY" context_field="owner">
5209                     <context link="target_copy" field="circ_lib"/>
5210                 </create>
5211                 <retrieve/>
5212                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5213                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5214             </actions>
5215         </permacrud>
5216         </class>
5217         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
5218                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
5219                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5220                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
5221                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
5222                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
5223                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5224                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
5225                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5226                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
5227                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5228                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
5229                 </fields>
5230                 <links>
5231                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5232                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
5233                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
5234                 </links>
5235         </class>
5236         <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">
5237                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
5238                         <field name="grp" />
5239                         <field name="id" reporter:datatype="id" />
5240                         <field name="usr" />
5241                 </fields>
5242                 <links>
5243                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5244                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5245                 </links>
5246         </class>
5247         <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">
5248                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
5249                         <field name="id" reporter:datatype="id" />
5250                         <field name="fq_field" reporter:datatype="text"/>
5251                         <field name="identity_value" reporter:datatype="text"/>
5252                         <field name="translation" reporter:datatype="text"/>
5253                         <field name="string" reporter:datatype="text"/>
5254                 </fields>
5255                 <links>
5256                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
5257                 </links>
5258         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5259             <actions>
5260                 <create permission="CREATE_TRANSLATION" global_required="true"/>
5261                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
5262                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
5263                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
5264             </actions>
5265         </permacrud>
5266         </class>
5267         <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">
5268                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
5269                         <field name="id" reporter:datatype="id" />
5270                         <field name="fm_class" reporter:datatype="text"/>
5271                         <field name="field" reporter:datatype="text"/>
5272                         <field name="owner" reporter:datatype="org_unit"/>
5273                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
5274                 </fields>
5275                 <links>
5276                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5277                 </links>
5278         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5279             <actions>
5280                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5281                 <retrieve/>
5282                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5283                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5284             </actions>
5285         </permacrud>
5286         </class>
5287         <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">
5288                 <fields oils_persist:primary="code">
5289                         <field name="code" reporter:datatype="id" />
5290                         <field name="marc_code" reporter:datatype="text"/>
5291                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5292                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5293                 </fields>
5294                 <links/>
5295         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5296             <actions>
5297                 <create permission="CREATE_LOCALE" global_required="true"/>
5298                 <retrieve/>
5299                 <update permission="UPDATE_LOCALE" global_required="true"/>
5300                 <delete permission="DELETE_LOCALE" global_required="true"/>
5301             </actions>
5302         </permacrud>
5303         </class>
5304         <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">
5305                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
5306                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
5307                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
5308                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
5309             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
5310                 </fields>
5311                 <links>
5312                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5313                 </links>
5314         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5315             <actions>
5316                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
5317                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
5318                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
5319                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
5320             </actions>
5321         </permacrud>
5322         </class>
5323
5324         <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">
5325                 <fields oils_persist:primary="id">
5326                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5327                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5328                 </fields>
5329                 <links/>
5330         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5331             <actions>
5332                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5333                 <retrieve/>
5334                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5335                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5336             </actions>
5337         </permacrud>
5338         </class>
5339
5340         <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">
5341                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
5342                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5343                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5344                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
5345                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
5346                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
5347                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
5348                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
5349                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
5350                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5351                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
5352                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
5353                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
5354                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
5355                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
5356                         <field reporter:label="Title" name="title" reporter:datatype="text" />
5357                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
5358                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5359                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
5360                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
5361                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
5362                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
5363                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
5364                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
5365                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
5366                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5367                 </fields>
5368                 <links>
5369                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5370                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5371                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5372                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
5373                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
5374                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5375                 </links>
5376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5377             <actions>
5378                 <create permission="user_request.create">
5379                     <context link="usr" field="home_ou"/>
5380                                 </create>
5381                 <retrieve permission="user_request.view">
5382                     <context link="usr" field="home_ou"/>
5383                                 </retrieve>
5384                 <update permission="user_request.update">
5385                     <context link="usr" field="home_ou"/>
5386                                 </update>
5387                 <delete permission="user_request.delete">
5388                     <context link="usr" field="home_ou"/>
5389                                 </delete>
5390             </actions>
5391         </permacrud>
5392         </class>
5393
5394         <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">
5395                 <fields oils_persist:primary="code">
5396                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
5397                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5398                 </fields>
5399                 <links/>
5400         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5401             <actions>
5402                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5403                 <retrieve/>
5404                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5405                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5406             </actions>
5407         </permacrud>
5408         </class>
5409
5410         <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">
5411                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
5412                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
5413                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
5414                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
5415                         <field reporter:label="Ratio" name="ratio" />
5416                 </fields>
5417                 <links>
5418                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
5419                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
5420                 </links>
5421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5422                         <actions>
5423                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5424                                 <retrieve/>
5425                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5426                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5427                         </actions>
5428                 </permacrud>
5429         </class>
5430
5431         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
5432                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
5433                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5434                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5435                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5436                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5437                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5438                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
5439                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
5440                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
5441                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
5442                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5443                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5444                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5445                         <field reporter:label="Email" name="email" reporter:datatype="text" />
5446                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
5447                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
5448                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
5449                 </fields>
5450                 <links>
5451                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5452                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5453             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
5454             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
5455             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
5456                 </links>
5457         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5458             <actions>
5459                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
5460                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
5461                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
5462                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
5463             </actions>
5464         </permacrud>
5465         </class>
5466
5467         <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">
5468                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
5469                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5470                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5471                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5472                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5473                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5474                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5475                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5476                 </fields>
5477                 <links>
5478                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5479                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5480                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5481                 </links>
5482         </class>
5483
5484         <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">
5485                 <fields oils_persist:primary="code">
5486                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
5487                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5488                 </fields>
5489                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5490             <actions>
5491                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5492                 <retrieve/>
5493                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5494                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5495             </actions>
5496                 </permacrud>
5497         </class>
5498
5499         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
5500                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
5501                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
5502                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
5503                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5504                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
5505                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
5506                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
5507                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
5508                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
5509                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
5510                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
5511                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5512                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
5513                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
5514                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
5515                 </fields>
5516                 <links>
5517                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
5518                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5519                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
5520                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
5521                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
5522                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
5523                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
5524                 </links>
5525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5526             <actions>
5527                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
5528                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
5529                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
5530                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
5531             </actions>
5532         </permacrud>
5533         </class>
5534
5535         <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">
5536                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
5537                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5538                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5539                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5540                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
5541                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
5542                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
5543                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5544                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
5545                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5546                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5547                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5548                 </fields>
5549                 <links>
5550                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5551                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5552                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5553                 </links>
5554         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5555             <actions>
5556                 <create   permission="ADMIN_INVOICE">
5557                                         <context link="invoice" field="receiver"/>
5558                                 </create>
5559                 <retrieve permission="ADMIN_INVOICE">
5560                                         <context link="invoice" field="receiver"/>
5561                                 </retrieve>
5562                 <update   permission="ADMIN_INVOICE">
5563                                         <context link="invoice" field="receiver"/>
5564                                 </update>
5565                                 <delete   permission="ADMIN_INVOICE">
5566                                         <context link="invoice" field="receiver"/>
5567                                 </delete>
5568             </actions>
5569         </permacrud>
5570         </class>
5571
5572         <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">
5573                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
5574                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5575                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
5576                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
5577                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5578                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
5579                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
5580                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5581                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5582                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
5583                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
5584                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5585                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
5586                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
5587                         <field reporter:label="Target" name="target" reporter:datatype="int" />
5588                 </fields>
5589                 <links>
5590                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
5591                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
5592                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5593                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
5594                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5595                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
5596                 </links>
5597         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5598             <actions>
5599                 <create   permission="ADMIN_INVOICE">
5600                                         <context link="invoice" field="receiver"/>
5601                                 </create>
5602                 <retrieve permission="ADMIN_INVOICE">
5603                                         <context link="invoice" field="receiver"/>
5604                                 </retrieve>
5605                 <update   permission="ADMIN_INVOICE">
5606                                         <context link="invoice" field="receiver"/>
5607                                 </update>
5608                                 <delete   permission="ADMIN_INVOICE">
5609                                         <context link="invoice" field="receiver"/>
5610                                 </delete>
5611             </actions>
5612         </permacrud>
5613         </class>
5614
5615         <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">
5616                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
5617                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
5618                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5619                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5620                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5621                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5622                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5623                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
5624                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5625                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
5626                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
5627                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
5628                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5629                 </fields>
5630                 <links>
5631                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5632                 </links>
5633         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5634             <actions>
5635                 <create permission="ADMIN_PROVIDER">
5636                     <context link="provider" field="owner"/>
5637                 </create>
5638                 <retrieve permission="ADMIN_PROVIDER">
5639                     <context link="provider" field="owner"/>
5640                 </retrieve>
5641                 <update permission="ADMIN_PROVIDER">
5642                     <context link="provider" field="owner"/>
5643                 </update>
5644                 <delete permission="ADMIN_PROVIDER">
5645                     <context link="provider" field="owner"/>
5646                 </delete>
5647             </actions>
5648         </permacrud>
5649         </class>
5650
5651         <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">
5652                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
5653                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5654                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5655                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5656                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
5657                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
5658                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
5659         </fields>
5660                 <links>
5661                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5662                 </links>
5663         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5664             <actions>
5665                 <create permission="ADMIN_PROVIDER">
5666                     <context link="provider" field="owner"/>
5667                 </create>
5668                 <retrieve permission="ADMIN_PROVIDER">
5669                     <context link="provider" field="owner"/>
5670                 </retrieve>
5671                 <update permission="ADMIN_PROVIDER">
5672                     <context link="provider" field="owner"/>
5673                 </update>
5674                 <delete permission="ADMIN_PROVIDER">
5675                     <context link="provider" field="owner"/>
5676                 </delete>
5677             </actions>
5678         </permacrud>
5679     </class>
5680         <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">
5681                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
5682                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
5683                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
5684                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
5685                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
5686                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
5687                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5688                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
5689                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
5690                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
5691                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
5692                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
5693                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
5694                 </fields>
5695                 <links>
5696                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
5697                 </links>
5698         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5699             <actions>
5700                 <create permission="ADMIN_PROVIDER">
5701                     <context link="contact" jump='provider' field="owner"/>
5702                 </create>
5703                 <retrieve permission="ADMIN_PROVIDER">
5704                     <context link="contact" jump='provider' field="owner"/>
5705                 </retrieve>
5706                 <update permission="ADMIN_PROVIDER">
5707                     <context link="contact" jump='provider' field="owner"/>
5708                 </update>
5709                 <delete permission="ADMIN_PROVIDER">
5710                     <context link="contact" jump='provider' field="owner"/>
5711                 </delete>
5712             </actions>
5713         </permacrud>
5714         </class>
5715
5716         <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">
5717                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
5718                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
5719                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
5720                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
5721                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
5722                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
5723                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
5724                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
5725                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5726                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
5727                 </fields>
5728                 <links>
5729                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
5730                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
5731                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
5732                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
5733                 </links>
5734                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5735                 </permacrud>
5736         </class>
5737
5738         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
5739                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
5740                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
5741                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
5742                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
5743                 </fields>
5744                 <links>
5745             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
5746                 </links>
5747                 <!--
5748                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
5749                         But here's what it should look like if we ever do use pcrud.
5750                 -->
5751                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5752                         <actions>
5753                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5754                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5755                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5756                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5757                         </actions>
5758                 </permacrud>
5759         </class>
5760
5761         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
5762                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
5763                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
5764                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
5765                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
5766                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
5767                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
5768                 </fields>
5769                 <links>
5770                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5771                 </links>
5772                 <!--
5773                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
5774                         But here's what it should look like if we ever do use pcrud.
5775                 -->
5776                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5777                         <actions>
5778                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5779                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5780                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5781                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
5782                         </actions>
5783                 </permacrud>
5784         </class>
5785
5786         <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">
5787                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
5788                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5789                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5790                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5791                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5792                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5793                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
5794                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
5795                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
5796                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5797                 </fields>
5798                 <links>
5799                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5800                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5801             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
5802             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
5803                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
5804                 </links>
5805         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5806             <actions>
5807                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5808                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
5809                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5810                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
5811             </actions>
5812         </permacrud>
5813         </class>
5814
5815         <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">
5816                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
5817                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
5818                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
5819                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5820                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5821                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
5822                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
5823                 </fields>
5824                 <links>
5825                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5826                 </links>
5827                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5828                         <actions>
5829                                 <create permission="ADMIN_FUNDING_SOURCE">
5830                     <context link="funding_source" field="owner"/>
5831                 </create>
5832                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
5833                     <context link="funding_source" field="owner"/>
5834                 </retrieve>
5835                                 <update permission="ADMIN_FUNDING_SOURCE">
5836                     <context link="funding_source" field="owner"/>
5837                 </update>
5838                                 <delete permission="ADMIN_FUNDING_SOURCE">
5839                     <context link="funding_source" field="owner"/>
5840                 </delete>
5841                         </actions>
5842                 </permacrud>
5843         </class>
5844
5845         <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">
5846                 <fields oils_persist:primary="id">
5847                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
5848                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
5849                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
5850                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
5851                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
5852                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5853                 </fields>
5854                 <links>
5855                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
5856                 </links>
5857                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5858                 </permacrud>
5859         </class>
5860
5861         <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">
5862                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
5863                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
5864                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5865                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
5866                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
5867                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5868                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
5869                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
5870                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
5871                 </fields>
5872                 <links>
5873                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5874                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5875                 </links>
5876                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5877                         <actions>
5878                                 <create permission="ADMIN_ACQ_FUND">
5879                     <context link="fund" field="org"/>
5880                 </create>
5881                                 <retrieve permission="ADMIN_ACQ_FUND">
5882                     <context link="fund" field="org"/>
5883                 </retrieve>
5884                                 <update permission="ADMIN_ACQ_FUND">
5885                     <context link="fund" field="org"/>
5886                 </update>
5887                                 <delete permission="ADMIN_ACQ_FUND">
5888                     <context link="fund" field="org"/>
5889                 </delete>
5890                         </actions>
5891                 </permacrud>
5892         </class>
5893
5894         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
5895                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
5896                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5897                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
5898                         <field reporter:label="Name" name="name" reporter:datatype="text" />
5899                         <field reporter:label="Year" name="year" reporter:datatype="int" />
5900                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
5901                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5902                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
5903                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
5904                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5905                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
5906                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
5907                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
5908                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
5909                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
5910                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
5911                 </fields>
5912                 <links>
5913                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5914                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5915             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
5916             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
5917             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
5918                 </links>
5919         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5920             <actions>
5921                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
5922                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
5923                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
5924                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
5925             </actions>
5926         </permacrud>
5927         </class>
5928
5929         <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">
5930                 <fields oils_persist:primary="fund">
5931                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5932                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
5933                 </fields>
5934                 <links>
5935                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5936                 </links>
5937         </class>
5938
5939         <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">
5940                 <fields oils_persist:primary="fund">
5941                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5942                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
5943                 </fields>
5944                 <links>
5945                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5946                 </links>
5947         </class>
5948
5949         <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">
5950                 <fields oils_persist:primary="fund">
5951                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5952                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
5953                 </fields>
5954                 <links>
5955                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5956                 </links>
5957         </class>
5958
5959         <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">
5960                 <fields oils_persist:primary="fund">
5961                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5962                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
5963                 </fields>
5964                 <links>
5965                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5966                 </links>
5967         </class>
5968
5969         <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">
5970                 <fields oils_persist:primary="fund">
5971                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5972                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
5973                 </fields>
5974                 <links>
5975                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5976                 </links>
5977         </class>
5978
5979    <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">
5980         <fields oils_persist:primary="fund">
5981             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5982             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
5983         </fields>
5984         <links>
5985             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5986         </links>
5987     </class>
5988
5989    <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">
5990         <fields oils_persist:primary="fund">
5991             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
5992             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
5993         </fields>
5994         <links>
5995             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5996         </links>
5997     </class>
5998
5999    <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">
6000         <fields oils_persist:primary="fund">
6001             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6002             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6003         </fields>
6004         <links>
6005             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6006         </links>
6007     </class>
6008
6009    <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">
6010         <fields oils_persist:primary="fund">
6011             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6012             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6013         </fields>
6014         <links>
6015             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6016         </links>
6017     </class>
6018
6019    <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">
6020         <fields oils_persist:primary="fund">
6021             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6022             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6023         </fields>
6024         <links>
6025             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6026         </links>
6027     </class>
6028
6029         <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">
6030                 <fields oils_persist:primary="funding_source">
6031                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6032                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6033                 </fields>
6034                 <links>
6035                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6036                 </links>
6037         </class>
6038
6039         <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">
6040                 <fields oils_persist:primary="funding_source">
6041                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6042                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6043                 </fields>
6044                 <links>
6045                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6046                 </links>
6047         </class>
6048
6049         <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">
6050                 <fields oils_persist:primary="funding_source">
6051                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6052                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6053                 </fields>
6054                 <links>
6055                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6056                 </links>
6057         </class>
6058
6059         <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">
6060                 <fields oils_persist:primary="fund">
6061                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6062                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6063                 </fields>
6064                 <links>
6065                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6066                 </links>
6067         </class>
6068
6069         <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">
6070                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6071                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6072                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6073                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6074                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6075                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6076                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6077                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6078                 </fields>
6079                 <links>
6080                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6081                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6082                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6083                 </links>
6084                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6085                         <actions>
6086                                 <create permission="ADMIN_ACQ_FUND">
6087                     <context link="fund" field="org"/>
6088                 </create>
6089                                 <retrieve permission="ADMIN_ACQ_FUND">
6090                     <context link="fund" field="org"/>
6091                 </retrieve>
6092                                 <update permission="ADMIN_ACQ_FUND">
6093                     <context link="fund" field="org"/>
6094                 </update>
6095                                 <delete permission="ADMIN_ACQ_FUND">
6096                     <context link="fund" field="org"/>
6097                 </delete>
6098                         </actions>
6099                 </permacrud>
6100         </class>
6101
6102     <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">
6103         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6104             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6105             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6106             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6107             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6108             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6109             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6110             <field reporter:label="Note" name="note" reporter:datatype="text" />
6111             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6112         </fields>
6113         <links>
6114             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6115             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6116             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6117         </links>
6118                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6119                         <actions>
6120                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6121                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6122                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6123                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6124                         </actions>
6125                 </permacrud>
6126     </class>
6127
6128         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6129                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6130                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6131                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6132                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6133                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6134                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6135                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6136                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6137                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6138                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6139                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6140                 </fields>
6141                 <links>
6142                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6143                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6144                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6145                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6146                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6147                 </links>
6148                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6149                         <actions>
6150                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6151                         </actions>
6152                 </permacrud>
6153         </class>
6154
6155         <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">
6156                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6157                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6158                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6159                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6160                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6161                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6162                 </fields>
6163                 <links>
6164                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6165                 </links>
6166                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6167                         <actions>
6168                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6169                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6170                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6171                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6172                         </actions>
6173                 </permacrud>
6174         </class>
6175
6176         <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">
6177                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6178                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6179                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6180                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6181                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6182                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6183                         <field reporter:label="State" name="state" reporter:datatype="text" />
6184                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6185                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6186                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6187                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
6188                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6189                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6190                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6191                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
6192                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6193                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
6194                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
6195                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
6196                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
6197                 </fields>
6198                 <links>
6199                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6200                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6201                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6202                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
6203                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6204                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
6205                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
6206                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
6207                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6208                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6209                 </links>
6210                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6211                         <actions>
6212                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6213                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6214                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6215                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6216                         </actions>
6217                 </permacrud>
6218         </class>
6219
6220         <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">
6221                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
6222                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6223                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6224                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6225                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
6226                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6227                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6228                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6229                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
6230                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6231                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6232                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6233                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6234                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
6235                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6236                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6237                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6238                 </fields>
6239                 <links>
6240                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
6241                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6242                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6243                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6244                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6245                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6246                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6247                 </links>
6248                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6249             <actions>
6250                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6251             </actions>
6252                 </permacrud>
6253         </class>
6254
6255         <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">
6256                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
6257                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6258                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6259                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6260                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6261                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6262                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6263                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
6264                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6265                 </fields>
6266                 <links>
6267                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6268                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6269                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6270                 </links>
6271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6272             <actions>
6273                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6274                     <context link="purchase_order" field="ordering_agency"/>
6275                 </retrieve>
6276                 <create permission="CREATE_PURCHASE_ORDER">
6277                     <context link="purchase_order" field="ordering_agency"/>
6278                 </create>
6279                 <update permission="CREATE_PURCHASE_ORDER">
6280                     <context link="purchase_order" field="ordering_agency"/>
6281                 </update>
6282                 <delete permission="CREATE_PURCHASE_ORDER">
6283                     <context link="purchase_order" field="ordering_agency"/>
6284                 </delete>
6285             </actions>
6286                 </permacrud>
6287         </class>
6288
6289         <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">
6290                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
6291                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6292                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6293                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6294                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
6295                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6296                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
6297                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6298                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
6299                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
6300                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6301                 </fields>
6302                 <links>
6303                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6304                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6305                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6306                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6307                 </links>
6308                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6309             <actions>
6310                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6311                     <context link="purchase_order" field="ordering_agency"/>
6312                 </retrieve>
6313                 <create permission="CREATE_PURCHASE_ORDER">
6314                     <context link="purchase_order" field="ordering_agency"/>
6315                 </create>
6316                 <update permission="CREATE_PURCHASE_ORDER">
6317                     <context link="purchase_order" field="ordering_agency"/>
6318                 </update>
6319                 <delete permission="CREATE_PURCHASE_ORDER">
6320                     <context link="purchase_order" field="ordering_agency"/>
6321                 </delete>
6322             </actions>
6323                 </permacrud>
6324         </class>
6325
6326         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
6327                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
6328                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
6329                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
6330                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
6331                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6332                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6333                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6334                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6335                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
6336                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
6337                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
6338                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
6339                         <field reporter:label="State" name="state" reporter:datatype="text" />
6340                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6341                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6342                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
6343                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6344                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6345                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
6346                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
6347                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
6348                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
6349                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
6350                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
6351                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
6352                 </fields>
6353                 <links>
6354                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6355                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6356                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6357                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6358                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6359                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6360                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6361                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
6362                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
6363                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
6364                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6365                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
6366                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6367                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
6368                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
6369                 </links>
6370                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6371                         <actions>
6372                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
6373                                         <context link="purchase_order" field="ordering_agency"/>
6374                                         <context link="picklist" field="org_unit"/>
6375                                 </retrieve>
6376                         </actions>
6377                 </permacrud>
6378         </class>
6379
6380         <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">
6381                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
6382                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6383                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6384                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6385                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
6386                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6387                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6388                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
6389                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6390                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6391                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
6392                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
6393                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6394                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6395                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
6396                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
6397                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
6398                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6399                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
6400                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6401                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6402                 </fields>
6403                 <links>
6404                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
6405                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6406                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6407                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6408                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6409                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6410                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6411                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6412                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6413                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6414                 </links>
6415                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6416                         <actions>
6417                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6418                                         <context link="purchase_order" field="ordering_agency"/>
6419                                         <context link="picklist" field="org_unit"/>
6420                                 </retrieve>
6421                         </actions>
6422                 </permacrud>
6423         </class>
6424
6425         <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">
6426                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
6427                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
6428                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6429                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6430                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
6431                 </fields>
6432                 <links>
6433                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6434                 </links>
6435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6436                         <actions>
6437                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6438                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
6439                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6440                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6441                         </actions>
6442                 </permacrud>
6443         </class>
6444
6445         <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">
6446                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
6447                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
6448                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
6449                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6450                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6451                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6452                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6453                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6454                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
6455                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6456                 </fields>
6457                 <links>
6458                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6459                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6460                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6461                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
6462                 </links>
6463         </class>
6464
6465         <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">
6466                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
6467                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
6468                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
6469                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
6470                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
6471                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
6472                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
6473                 </fields>
6474                 <links>
6475                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6476                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
6477                 </links>
6478         </class>
6479
6480         <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">
6481                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
6482                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
6483                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6484                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
6485                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
6486                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
6487                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
6488                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6489                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
6490                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
6491                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
6492                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
6493                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6494                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
6495                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6496                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
6497                 </fields>
6498                 <links>
6499                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6500                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
6501                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6502                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6503                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6504                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6505                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6506                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6507                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
6508                 </links>
6509         </class>
6510
6511         <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">
6512                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6513                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6514                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6515                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6516                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6517                 </fields>
6518                 <links/>
6519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6520                         <actions>
6521                                 <retrieve />
6522                         </actions>
6523                 </permacrud>
6524         </class>
6525
6526         <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">
6527                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6528                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6529                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6530                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6531                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6532                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6533             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6534                 </fields>
6535                 <links/>
6536         <permacrud>
6537             <actions>
6538                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6539                 <retrieve />
6540                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6541                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
6542             </actions>
6543         </permacrud>
6544         </class>
6545
6546         <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">
6547                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6548                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6549                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6550                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6551                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6552                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6553                 </fields>
6554                 <links/>
6555         </class>
6556         <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">
6557                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6558                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6559                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6560                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6561                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6562                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6563                 </fields>
6564                 <links>
6565                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6566                 </links>
6567         </class>
6568
6569         <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">
6570             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6571                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6572                 <field reporter:label="Code" name="code" reporter:datatype="text" />
6573                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6574                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
6575                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6576                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6577         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
6578
6579             </fields>
6580             <links>
6581                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6582             </links>
6583             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6584                 <actions>
6585                     <create permission="ADMIN_PROVIDER">
6586                         <context link="provider" field="owner"/>
6587                     </create>
6588                     <retrieve permission="ADMIN_PROVIDER">
6589                         <context link="provider" field="owner"/>
6590                     </retrieve>
6591                     <update permission="ADMIN_PROVIDER">
6592                         <context link="provider" field="owner"/>
6593                     </update>
6594                     <delete permission="ADMIN_PROVIDER">
6595                         <context link="provider" field="owner"/>
6596                     </delete>
6597                 </actions>
6598             </permacrud>
6599         </class>
6600         
6601         <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">
6602             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
6603                 <field reporter:label="ID" name="id" reporter:datatype="id" />
6604                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6605                 <field reporter:label="Name" name="name" reporter:datatype="text" />
6606                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
6607             </fields>
6608             <links>
6609                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6610             </links>
6611             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6612                 <actions>
6613                     <create permission="ADMIN_PROVIDER">
6614                         <context link="provider" field="owner"/>
6615                     </create>
6616                     <retrieve permission="ADMIN_PROVIDER">
6617                         <context link="provider" field="owner"/>
6618                     </retrieve>
6619                     <update permission="ADMIN_PROVIDER">
6620                         <context link="provider" field="owner"/>
6621                     </update>
6622                     <delete permission="ADMIN_PROVIDER">
6623                         <context link="provider" field="owner"/>
6624                     </delete>
6625                 </actions>
6626             </permacrud>
6627         </class>
6628         
6629         <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">
6630             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6631                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6632                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6633                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6634                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6635                 </fields>
6636                 <links/>
6637         </class>
6638
6639         <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">
6640                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
6641                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
6642                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
6643                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
6644                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
6645                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
6646                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
6647                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
6648                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
6649                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
6650                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
6651                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
6652                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
6653                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
6654                 </fields>
6655                 <links>
6656                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6657                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6658                 </links>
6659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6660             <actions>
6661                 <create permission="ADMIN_PROVIDER">
6662                     <context link="provider" field="owner"/>
6663                 </create>
6664                 <retrieve permission="ADMIN_PROVIDER">
6665                     <context link="provider" field="owner"/>
6666                 </retrieve>
6667                 <update permission="ADMIN_PROVIDER">
6668                     <context link="provider" field="owner"/>
6669                 </update>
6670                 <delete permission="ADMIN_PROVIDER">
6671                     <context link="provider" field="owner"/>
6672                 </delete>
6673             </actions>
6674         </permacrud>
6675         </class>
6676
6677         <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">
6678                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
6679                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
6680                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
6681                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
6682                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
6683                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
6684                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
6685                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
6686                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
6687                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
6688                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
6689                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
6690                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
6691                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
6692                 </fields>
6693                 <links>
6694                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
6695                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6696                 </links>
6697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6698             <actions>
6699                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6700                     <context link="account" jump="provider" field="owner"/>
6701                 </retrieve>
6702                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6703                     <context link="account" jump="provider" field="owner"/>
6704                 </update>
6705                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
6706                     <context link="account" jump="provider" field="owner"/>
6707                 </delete>
6708             </actions>
6709         </permacrud>
6710         </class>
6711
6712
6713         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
6714                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
6715                         <field name="id" reporter:datatype="id" />
6716                         <field name="parent" reporter:datatype="link"/>
6717                         <field name="owner" reporter:datatype="link"/>
6718                         <field name="create_time" reporter:datatype="timestamp"/>
6719                         <field name="name" reporter:datatype="text"/>
6720                         <field name="shared" reporter:datatype="bool"/>
6721                         <field name="share_with" reporter:datatype="link"/>
6722                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6723                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
6724                 </fields>
6725                 <links>
6726                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6727                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
6728                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
6729                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6730                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
6731                 </links>
6732         </class>
6733         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
6734                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
6735                         <field name="id" reporter:datatype="id" />
6736                         <field name="parent" reporter:datatype="link"/>
6737                         <field name="owner" reporter:datatype="link"/>
6738                         <field name="create_time" reporter:datatype="timestamp"/>
6739                         <field name="name" reporter:datatype="text"/>
6740                         <field name="shared" reporter:datatype="bool"/>
6741                         <field name="share_with" reporter:datatype="link"/>
6742                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6743                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
6744                 </fields>
6745                 <links>
6746                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6747                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
6748                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
6749                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6750                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
6751                 </links>
6752         </class>
6753         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
6754                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
6755                         <field name="id" reporter:datatype="id" />
6756                         <field name="parent" reporter:datatype="link"/>
6757                         <field name="owner" reporter:datatype="link"/>
6758                         <field name="create_time" reporter:datatype="timestamp"/>
6759                         <field name="name" reporter:datatype="text"/>
6760                         <field name="shared" reporter:datatype="bool"/>
6761                         <field name="share_with" reporter:datatype="link"/>
6762                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6763                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
6764                 </fields>
6765                 <links>
6766                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6767                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
6768                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
6769                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
6770                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
6771                 </links>
6772         </class>
6773         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
6774                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
6775                         <field name="id" reporter:datatype="id" />
6776                         <field name="owner" reporter:datatype="link"/>
6777                         <field name="create_time" reporter:datatype="timestamp"/>
6778                         <field name="name" reporter:datatype="text"/>
6779                         <field name="data" reporter:datatype="text"/>
6780                         <field name="folder" reporter:datatype="link"/>
6781                         <field name="description" reporter:datatype="text"/>
6782                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
6783                 </fields>
6784                 <links>
6785                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6786                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
6787                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
6788                 </links>
6789         </class>
6790         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
6791                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
6792                         <field name="id" reporter:datatype="id" />
6793                         <field name="owner" reporter:datatype="link"/>
6794                         <field name="create_time" reporter:datatype="timestamp"/>
6795                         <field name="template" reporter:datatype="link"/>
6796                         <field name="data" reporter:datatype="text"/>
6797                         <field name="folder" reporter:datatype="link"/>
6798                         <field name="recur" reporter:datatype="bool"/>
6799                         <field name="recurrence" reporter:datatype="interval"/>
6800                         <field name="name" reporter:datatype="text"/>
6801                         <field name="description" reporter:datatype="text"/>
6802                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
6803                 </fields>
6804                 <links>
6805                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6806                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
6807                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
6808                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
6809                 </links>
6810         </class>
6811         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
6812                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
6813                         <field name="id" reporter:datatype="id" />
6814                         <field name="runner" reporter:datatype="link"/>
6815                         <field name="start_time" reporter:datatype="timestamp"/>
6816                         <field name="complete_time" reporter:datatype="timestamp"/>
6817                         <field name="run_time" reporter:datatype="timestamp"/>
6818                         <field name="email" reporter:datatype="text"/>
6819                         <field name="excel_format" reporter:datatype="bool"/>
6820                         <field name="csv_format" reporter:datatype="bool"/>
6821                         <field name="html_format" reporter:datatype="bool"/>
6822                         <field name="error_code" reporter:datatype="int"/>
6823                         <field name="error_text" reporter:datatype="text"/>
6824                         <field name="report" reporter:datatype="link"/>
6825                         <field name="folder" reporter:datatype="link"/>
6826                         <field name="chart_pie" reporter:datatype="bool"/>
6827                         <field name="chart_bar" reporter:datatype="bool"/>
6828                         <field name="chart_line" reporter:datatype="bool"/>
6829                 </fields>
6830                 <links>
6831                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
6832                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
6833                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
6834                 </links>
6835         </class>
6836         <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">
6837                 <fields oils_persist:primary="id">
6838                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6839                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
6840                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6841                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6842                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6843                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6844                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6845                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6846                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6847                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6848                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6849                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6850                 </fields>
6851                 <links>
6852                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6853                 </links>
6854         </class>
6855         <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">
6856                 <fields oils_persist:primary="id">
6857                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6858                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
6859                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6860                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6861                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6862                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6863                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6864                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6865                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6866                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6867                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6868                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6869                 </fields>
6870                 <links>
6871                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6872                 </links>
6873         </class>
6874         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
6875                 <fields oils_persist:primary="id">
6876                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6877                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
6878                         <field reporter:label="Fingerprint" name="fingerprint" />
6879                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
6880                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
6881                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
6882                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
6883                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
6884                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
6885                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
6886                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
6887                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
6888                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
6889                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
6890                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
6891                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
6892                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
6893                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
6894                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
6895                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
6896                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
6897                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
6898                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
6899                 </fields>
6900                 <links>
6901                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
6902                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
6903                 </links>
6904         </class>
6905         <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">
6906                 <fields oils_persist:primary="id">
6907                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
6908                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
6909                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
6910                 </fields>
6911                 <links>
6912                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
6913                 </links>
6914         </class>
6915         <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">
6916                 <fields oils_persist:primary="id">
6917                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
6918                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
6919                 </fields>
6920                 <links>
6921                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
6922                 </links>
6923         </class>
6924         <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">
6925                 <fields oils_persist:primary="id">
6926                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6927                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
6928                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
6929                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
6930                 </fields>
6931                 <links>
6932                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
6933                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
6934                 </links>
6935         </class>
6936         <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">
6937                 <fields oils_persist:primary="xact">
6938                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
6939                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
6940                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
6941                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
6942                 </fields>
6943                 <links>
6944                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
6945                 </links>
6946         </class>
6947         <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">
6948                 <fields oils_persist:primary="xact">
6949                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
6950                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
6951                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
6952                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
6953                 </fields>
6954                 <links>
6955                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
6956                 </links>
6957         </class>
6958         <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)">
6959                 <fields oils_persist:primary="id">
6960                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
6961                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
6962                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
6963                 </fields>
6964                 <links>
6965                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
6966                 </links>
6967         </class>
6968         <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">
6969                 <fields oils_persist:primary="id">
6970                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
6971                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
6972                 </fields>
6973                 <links>
6974                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
6975                 </links>
6976         </class>
6977         <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">
6978                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
6979                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
6980                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
6981                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
6982                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
6983                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6984                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
6985                 </fields>
6986                 <links>
6987                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6988                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
6989                 </links>
6990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6991                         <actions>
6992                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6993                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6994                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6995                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
6996                         </actions>
6997                 </permacrud>
6998         </class>
6999         <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">
7000                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7001                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7002                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7003                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7004                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7005                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7006                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7007                 </fields>
7008                 <links>
7009                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7010                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7011                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7012                 </links>
7013                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7014                         <actions>
7015                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7016                                         <context link="formula" field="owner"/>
7017                                 </create>
7018                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7019                                         <context link="formula" field="owner"/>
7020                                 </retrieve>
7021                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7022                                         <context link="formula" field="owner"/>
7023                                 </update>
7024                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7025                                         <context link="formula" field="owner"/>
7026                                 </delete>
7027                         </actions>
7028                 </permacrud>
7029         </class>
7030
7031         <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">
7032                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7033                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7034                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7035                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7036                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7037                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7038                 </fields>
7039                 <links>
7040                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7041                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7042                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7043                 </links>
7044                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7045                         <actions>
7046                                 <create permission="CREATE_PURCHASE_ORDER">
7047                                         <context link="formula" field="owner"/>
7048                 </create>
7049                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7050                                         <context link="formula" field="owner"/>
7051                 </retrieve>
7052                                 <update permission="CREATE_PURCHASE_ORDER">
7053                                         <context link="formula" field="owner"/>
7054                 </update>
7055                                 <delete permission="CREATE_PURCHASE_ORDER">
7056                                         <context link="formula" field="owner"/>
7057                 </delete>
7058                         </actions>
7059                 </permacrud>
7060         </class>
7061
7062         <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">
7063                 <fields oils_persist:primary="id">
7064                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7065                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7066                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7067                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7068                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7069                 </fields>
7070                 <links>
7071                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7072                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7073                 </links>
7074                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7075                 </permacrud>
7076         </class>
7077
7078         <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">
7079                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7080                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7081                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7082                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7083                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7084                 </fields>
7085                 <links>
7086                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7087                 </links>
7088                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7089                         <actions>
7090                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7091                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7092                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7093                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7094                         </actions>
7095                 </permacrud>
7096         </class>
7097
7098         <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">
7099                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7100                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7101                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7102                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7103                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7104                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
7105                 </fields>
7106                 <links>
7107                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7108                 </links>
7109                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7110                         <actions>
7111                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7112                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7113                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7114                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7115                         </actions>
7116                 </permacrud>
7117         </class>
7118
7119         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7120                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7121                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7122                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7123                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7124                 </fields>
7125                 <links>
7126                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7127                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7128                 </links>
7129                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7130                 </permacrud>
7131         </class>
7132
7133         <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">
7134                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7135                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7136                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7137                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7138                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7139                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7140                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7141                 </fields>
7142                 <links>
7143                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7144                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7145                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7146                 </links>
7147                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7148                 </permacrud>
7149         </class>
7150
7151         <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">
7152                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7153                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7154                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7155                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7156                 </fields>
7157                 <links>
7158                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7159                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7160                 </links>
7161                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7162                 </permacrud>
7163         </class>
7164
7165         <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">
7166                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7167                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7168                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7169                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7170                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7171                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7172                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7173                 </fields>
7174                 <links>
7175                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7176                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7177                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7178                 </links>
7179                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7180                 </permacrud>
7181         </class>
7182
7183         <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">
7184                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7185                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7186                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7187                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7188                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7189                 </fields>
7190                 <links>
7191                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7192                 </links>
7193                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7194             <actions>
7195                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7196                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
7197                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7198                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7199             </actions>
7200                 </permacrud>
7201         </class>
7202
7203         <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">
7204                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
7205                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
7206                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
7207                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
7208                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
7209                 </fields>
7210                 <links>
7211                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7212                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
7213                 </links>
7214                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7215                         <actions>
7216                                 <create permission="ADMIN_CLAIM_POLICY">
7217                                         <context link="claim_policy" field="org_unit"/>
7218                 </create>
7219                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
7220                                         <context link="claim_policy" field="org_unit"/>
7221                 </retrieve>
7222                                 <update permission="ADMIN_CLAIM_POLICY">
7223                                         <context link="claim_policy" field="org_unit"/>
7224                 </update>
7225                                 <delete permission="ADMIN_CLAIM_POLICY">
7226                                         <context link="claim_policy" field="org_unit"/>
7227                 </delete>
7228                         </actions>
7229                 </permacrud>
7230         </class>
7231
7232     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
7233         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
7234             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7235             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7236             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7237             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
7238             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7239             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
7240             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
7241             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
7242             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
7243             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
7244             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
7245             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
7246             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
7247             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
7248             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7249         </fields>
7250     </class>
7251
7252     <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">
7253         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
7254             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7255             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7256             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7257             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7258             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7259         </fields>
7260     </class>
7261
7262     <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">
7263         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
7264             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7265             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7266             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7267             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7268             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7269             <field reporter:label="City" name="city" reporter:datatype="text"/>
7270             <field reporter:label="State" name="state" reporter:datatype="text"/>
7271             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7272             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7273             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7274         </fields>
7275     </class>
7276
7277     <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">
7278         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
7279             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7280             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7281             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7282             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7283             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7284             <field reporter:label="City" name="city" reporter:datatype="text"/>
7285             <field reporter:label="State" name="state" reporter:datatype="text"/>
7286             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7287             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7288             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7289         </fields>
7290     </class>
7291
7292     <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">
7293         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
7294             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7295             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7296             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7297             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
7298             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
7299             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7300         </fields>
7301     </class>
7302
7303         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
7304                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
7305                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
7306                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7307                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7308                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
7309                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
7310                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
7311                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
7312                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
7313                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
7314                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
7315                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
7316                 </fields>
7317                 <links>
7318                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7319                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7320                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7321                 </links>
7322                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7323                 </permacrud>
7324         </class>
7325
7326         <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">
7327                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
7328                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
7329                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
7330                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
7331                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
7332                 </fields>
7333                 <links>
7334                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
7335                 </links>
7336                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7337                 </permacrud>
7338         </class>
7339
7340     <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">
7341         <fields>
7342             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7343             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7344             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7345         </fields>
7346                 <links>
7347                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7348                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7349                 </links>
7350     </class>
7351
7352     <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">
7353         <fields>
7354             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7355             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
7356         </fields>
7357                 <links>
7358                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7359                 </links>
7360     </class>
7361
7362     <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">
7363         <fields>
7364             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7365             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7366             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7367         </fields>
7368                 <links>
7369                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7370                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7371                 </links>
7372     </class>
7373
7374     <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">
7375         <fields>
7376             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7377             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
7378         </fields>
7379                 <links>
7380                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7381                 </links>
7382     </class>
7383
7384     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
7385                 <oils_persist:source_definition>
7386
7387             SELECT  DISTINCT l.*
7388               FROM  action.unfulfilled_hold_loops l
7389                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
7390               WHERE l.count = m.max
7391
7392                 </oils_persist:source_definition>
7393         <fields>
7394             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7395             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7396             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7397         </fields>
7398                 <links>
7399                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7400                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7401                 </links>
7402     </class>
7403
7404         <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">
7405                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
7406                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
7407                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
7408                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
7409                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
7410                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
7411                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
7412                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
7413                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
7414                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
7415                 </fields>
7416                 <links>
7417                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
7418                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
7419                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
7420                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
7421                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
7422                 </links>
7423                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7424                 </permacrud>
7425         </class>
7426
7427         <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">
7428                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
7429                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
7430                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
7431                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7432                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
7433                 </fields>
7434                 <links>
7435                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
7436                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
7437                 </links>
7438                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7439                 </permacrud>
7440         </class>
7441
7442         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
7443                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
7444                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
7445                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
7446                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
7447                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
7448                 </fields>
7449                 <links>
7450                 </links>
7451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7452                 </permacrud>
7453         </class>
7454
7455         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
7456                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
7457                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
7458                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
7459                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7460                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
7461                 </fields>
7462                 <links>
7463                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
7464                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
7465                 </links>
7466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7467                 </permacrud>
7468         </class>
7469         
7470         <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">
7471                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
7472                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
7473                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
7474                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
7475                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
7476                 </fields>
7477                 <links>
7478                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
7479                 </links>
7480                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7481                 </permacrud>
7482         </class>
7483         
7484         <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">
7485                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
7486                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
7487                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7488                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7489                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
7490                 </fields>
7491                 <links>
7492                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7493                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
7494                 </links>
7495                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7496                 </permacrud>
7497         </class>
7498
7499         <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">
7500                 <fields oils_persist:primary="name">
7501                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
7502                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7503                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
7504                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7505                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
7506                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
7507                 </fields>
7508                 <links>
7509                 </links>
7510                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7511                 </permacrud>
7512         </class>
7513
7514         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
7515                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7516                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7517                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
7518                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7519                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7520                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7521                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7522                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7523                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7524                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7525                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7526                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
7527                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7528                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7529                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7530                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7531                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7532                 </fields>
7533                 <links>
7534                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7535                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7536                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
7537                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7538                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7539                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7540                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7541                 </links>
7542                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7543                 </permacrud>
7544         </class>
7545
7546         <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">
7547                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
7548                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
7549                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7550                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7551                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
7552                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
7553                 </fields>
7554                 <links>
7555                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7556                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
7557                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
7558                 </links>
7559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7560                 </permacrud>
7561         </class>
7562
7563         <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">
7564                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
7565                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
7566                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
7567                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
7568                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
7569                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
7570                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
7571                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7572                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
7573                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7574                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
7575                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
7576                 </fields>
7577                 <links>
7578                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7579                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
7580                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
7581                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
7582                 </links>
7583                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7584                 </permacrud>
7585         </class>
7586
7587         <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">
7588                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
7589                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
7590                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
7591                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7592                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7593                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
7594                 </fields>
7595                 <links>
7596                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
7597                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
7598                 </links>
7599                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7600                 </permacrud>
7601         </class>
7602
7603         <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">
7604                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
7605                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
7606                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7607                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7608                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7609                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
7610                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
7611                 </fields>
7612                 <links>
7613                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7614                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7615                 </links>
7616                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7617                 </permacrud>
7618         </class>
7619
7620         <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">
7621                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
7622                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
7623                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
7624                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7625                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
7626                 </fields>
7627                 <links>
7628                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7629                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
7630                 </links>
7631                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7632                 </permacrud>
7633         </class>
7634
7635         <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">
7636                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7637                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7638                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7639                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7640                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7641                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7642                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7643                 </fields>
7644                 <links>
7645                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7646                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7647                 </links>
7648                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7649                 </permacrud>
7650         </class>
7651
7652         <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">
7653                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7654                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7655                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7656                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7657                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7658                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
7659                 </fields>
7660                 <links>
7661                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7662                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
7663                 </links>
7664                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7665                 </permacrud>
7666         </class>
7667
7668         <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">
7669                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7670                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7671                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7672                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7673                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7674                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7675                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7676                 </fields>
7677                 <links>
7678                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7679                 </links>
7680                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7681                 </permacrud>
7682         </class>
7683
7684         <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">
7685                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7686                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7687                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7688                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7689                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7690                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7691                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7692                 </fields>
7693                 <links>
7694                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7695                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7696                 </links>
7697                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7698                 </permacrud>
7699         </class>
7700
7701         <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">
7702                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7703                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7704                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7705                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7706                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7707                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7708                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
7709                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7710                 </fields>
7711                 <links>
7712                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7713                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7714                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
7715                 </links>
7716                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7717                 </permacrud>
7718         </class>
7719
7720         <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">
7721                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7722                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7723                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7724                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7725                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7726                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7727                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7728                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7729                 </fields>
7730                 <links>
7731                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7732                 </links>
7733                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7734                 </permacrud>
7735         </class>
7736
7737         <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">
7738                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7739                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7740                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7741                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7742                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7743                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7744                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7745                 </fields>
7746                 <links>
7747                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7748                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7749                 </links>
7750                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7751                 </permacrud>
7752         </class>
7753
7754         <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">
7755                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7756                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7757                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7758                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7759                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7760                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7761                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7762                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7763                 </fields>
7764                 <links>
7765                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7766                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7767                 </links>
7768                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7769                 </permacrud>
7770         </class>
7771
7772         <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">
7773                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7774                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7775                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7776                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7777                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7778                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7779                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7780                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7781                 </fields>
7782                 <links>
7783                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7784                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7785                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7786                 </links>
7787                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7788                 </permacrud>
7789         </class>
7790
7791         <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">
7792                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7793                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7794                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7795                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7796                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7797                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7798                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7799                 </fields>
7800                 <links>
7801                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7802                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7803                 </links>
7804                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7805                 </permacrud>
7806         </class>
7807
7808         <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">
7809                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7810                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7811                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7812                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7813                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7814                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7815                 </fields>
7816                 <links>
7817                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7818                 </links>
7819                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7820                 </permacrud>
7821         </class>
7822
7823         <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">
7824                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7825                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7826                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7827                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7828                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7829                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7830                 </fields>
7831                 <links>
7832                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7833                 </links>
7834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7835                 </permacrud>
7836         </class>
7837
7838         <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">
7839                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7840                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7841                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7842                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7843                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7844                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7845                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7846                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
7847                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7848                 </fields>
7849                 <links>
7850                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7851                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
7852                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
7853                 </links>
7854                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7855                 </permacrud>
7856         </class>
7857
7858         <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">
7859                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7860                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7861                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7862                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7863                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7864                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7865                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
7866                 </fields>
7867                 <links>
7868                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7869                 </links>
7870                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7871                 </permacrud>
7872         </class>
7873
7874         <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">
7875                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7876                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7877                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7878                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7879                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7880                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7881                 </fields>
7882                 <links>
7883                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7884                 </links>
7885                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7886                 </permacrud>
7887         </class>
7888
7889         <class id="xsubq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
7890                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7891                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7892                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7893                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7894                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7895                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
7896                 </fields>
7897                 <links>
7898                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
7899                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
7900                 </links>
7901                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7902                 </permacrud>
7903         </class>
7904
7905         <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">
7906                 <fields oils_persist:primary="id">
7907                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
7908                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
7909                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
7910                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
7911                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
7912                 </fields>
7913                 <links>
7914                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
7915                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
7916                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
7917                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7918                 </links>
7919         </class>
7920
7921         <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">
7922                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
7923                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7924                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
7925                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
7926                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
7927                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
7928                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
7929                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
7930                 </fields>
7931                 <links/>
7932                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7933                         <actions>
7934                                 <retrieve/>
7935                         </actions>
7936                 </permacrud>
7937         </class>
7938
7939         <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">
7940                 <fields oils_persist:primary="ptype_key">
7941                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
7942                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7943                 </fields>
7944                 <links/>
7945                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7946                         <actions>
7947                                 <retrieve/>
7948                         </actions>
7949                 </permacrud>
7950         </class>
7951
7952         <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">
7953                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
7954                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7955                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
7956                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
7957                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
7958                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
7959                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7960                 </fields>
7961                 <links>
7962                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
7963                 </links>
7964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7965                         <actions>
7966                                 <retrieve/>
7967                         </actions>
7968                 </permacrud>
7969         </class>
7970
7971         <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">
7972                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
7973                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7974                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
7975                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
7976                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7977                 </fields>
7978                 <links>
7979                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
7980                 </links>
7981                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7982                         <actions>
7983                                 <retrieve/>
7984                         </actions>
7985                 </permacrud>
7986         </class>
7987
7988         <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">
7989                 <fields oils_persist:primary="code">
7990                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
7991                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
7992                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
7993                 </fields>
7994                 <links/>
7995                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7996                         <actions>
7997                                 <retrieve/>
7998                         </actions>
7999                 </permacrud>
8000         </class>
8001
8002         <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">
8003                 <oils_persist:source_definition>
8004
8005             SELECT  b.id,
8006                     MAX(dcp.edit_date) AS last_delete_date
8007              FROM   biblio.record_entry b
8008                     JOIN asset.call_number cn ON (cn.record = b.id)
8009                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8010              WHERE  NOT b.deleted
8011              GROUP BY b.id
8012              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8013
8014                 </oils_persist:source_definition>
8015                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8016                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8017                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8018                 </fields>
8019                 <links>
8020                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8021                 </links>
8022                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8023                         <actions>
8024                                 <retrieve/>
8025                         </actions>
8026                 </permacrud>
8027         </class>
8028
8029         <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">
8030                 <oils_persist:source_definition>
8031
8032             -- -- 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.
8033             -- -- 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
8034             -- -- may not.
8035             -- SELECT
8036             --     bre.id AS "bib_id",
8037             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8038             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8039             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8040             -- FROM (
8041                 SELECT
8042                     y.bre AS "id",
8043                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8044                     y.hold_count AS "hold_count",
8045                     (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"
8046                 FROM (
8047                         SELECT
8048                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8049                             COUNT(*) AS "hold_count"
8050                         FROM action.hold_request h
8051                         WHERE
8052                             cancel_time IS NULL
8053                             AND fulfillment_time IS NULL
8054                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8055                         GROUP BY 1
8056                     )y LEFT JOIN (
8057                         SELECT 
8058                             (SELECT id
8059                                 FROM biblio.record_entry 
8060                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8061                             ) AS "bre", 
8062                             COUNT(*) AS "copy_count"
8063                         FROM asset.copy
8064                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8065                         WHERE copy.holdable 
8066                             AND NOT copy.deleted 
8067                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8068                         GROUP BY 1
8069                     )x ON x.bre = y.bre
8070                 -- )z RIGHT JOIN (
8071                 --     SELECT id
8072                 --     FROM biblio.record_entry
8073                 --     WHERE NOT deleted
8074                 -- )bre ON (z.bib_id = bre.id)
8075                 
8076
8077                 </oils_persist:source_definition>
8078                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8079                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8080                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8081                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8082                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8083                 </fields>
8084                 <links>
8085                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8086                 </links>
8087                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8088                         <actions>
8089                                 <retrieve/>
8090                         </actions>
8091                 </permacrud>
8092         </class>
8093
8094         <!-- ********************************************************************************************************************* -->
8095         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8096         <!-- ********************************************************************************************************************* -->
8097         <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">
8098                 <fields oils_persist:primary="id">
8099                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8100                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8101                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8102                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8103                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8104                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8105                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8106                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8107                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8108                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8109                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8110                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8111                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8112                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8113                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8114                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8115                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8116                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8117                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8118                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8119                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8120                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8121                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8122                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8123                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8124                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8125                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8126                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8127                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8128                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8129                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8130                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8131                 </fields>
8132                 <links>
8133                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8134                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8135                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8136                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8137                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8138                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8139                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8140                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8141                 </links>
8142         </class>
8143
8144         <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">
8145                 <fields oils_persist:primary="id">
8146                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8147                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8148                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8149                 </fields>
8150                 <links>
8151                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8152                 </links>
8153         </class>
8154
8155         <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">
8156                 <fields oils_persist:primary="id">
8157                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8158                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8159                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8160                 </fields>
8161                 <links>
8162                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8163                 </links>
8164         </class>
8165
8166         <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">
8167                 <fields oils_persist:primary="id">
8168                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8169
8170                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
8171                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
8172                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
8173
8174                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
8175                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
8176                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
8177
8178                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
8179                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
8180
8181                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8182                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
8183                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
8184
8185                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
8186                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
8187
8188                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
8189                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
8190                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
8191
8192                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
8193                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
8194                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
8195
8196                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8197                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
8198                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
8199                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
8200
8201                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
8202                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
8203
8204                 </fields>
8205                 <links>
8206                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
8207                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8208                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
8209                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
8210                 </links>
8211         </class>
8212
8213         <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">
8214                 <oils_persist:source_definition>
8215
8216             SELECT
8217                 po.ordering_agency AS ordering_agency,
8218                 po.id AS purchase_order,
8219                 li.id AS lineitem,
8220                 lid.id AS lineitem_detail,
8221                 cpa.id AS claim_policy_action
8222             FROM
8223                 acq.lineitem_detail lid
8224                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
8225                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
8226                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
8227                 JOIN acq.claim_policy_action cpa ON (
8228                     cpa.claim_policy = cp.id
8229
8230                     -- we only care about claim policy actions whose claim
8231                     -- interval we'd reached or exceeded
8232                     AND (NOW() - cpa.action_interval) &gt; po.order_date
8233
8234                     -- filter out all claim policy actions where claim events
8235                     -- have occurred on or after the action's action_interval
8236                     AND NOT EXISTS (
8237                         SELECT 1
8238                         FROM
8239                             acq.claim_event evt
8240                             JOIN acq.claim claim ON (
8241                                 claim.id = evt.claim
8242                                 AND claim.lineitem_detail = lid.id
8243                             )
8244                         WHERE
8245                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
8246                     )
8247                 )
8248             WHERE
8249                 lid.cancel_reason IS NULL
8250                 AND li.cancel_reason IS NULL -- belt/suspenders
8251                 AND po.cancel_reason IS NULL -- belt/suspenders
8252                 AND lid.recv_time IS NULL
8253                 AND po.state = 'on-order'
8254             ORDER BY 1, 2, 3, 4, 5
8255
8256                 </oils_persist:source_definition>
8257                 <fields>
8258                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8259                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8260                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8261                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8262                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
8263                 </fields>
8264                 <links>
8265                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8266                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8267                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8268                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8269                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
8270                 </links>
8271         </class>
8272
8273         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
8274                 <oils_persist:source_definition>
8275
8276             SELECT 
8277                 li.id AS lineitem, 
8278                 (
8279                     SELECT COUNT(lid.id) 
8280                     FROM acq.lineitem_detail lid
8281                     WHERE lineitem = li.id
8282                 ) AS item_count,
8283                 (
8284                     SELECT COUNT(lid.id) 
8285                     FROM acq.lineitem_detail lid
8286                     WHERE recv_time IS NOT NULL AND lineitem = li.id
8287                 ) AS recv_count,
8288                 (
8289                     SELECT COUNT(lid.id) 
8290                     FROM acq.lineitem_detail lid
8291                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
8292                 ) AS cancel_count,
8293                 (
8294                     SELECT COUNT(lid.id) 
8295                     FROM acq.lineitem_detail lid
8296                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8297                     WHERE NOT debit.encumbrance AND lineitem = li.id
8298                 ) AS invoice_count,
8299                 (
8300                     SELECT COUNT(DISTINCT(lid.id)) 
8301                     FROM acq.lineitem_detail lid
8302                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
8303                     WHERE lineitem = li.id
8304                 ) AS claim_count,
8305                 (
8306                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
8307                     FROM acq.lineitem_detail lid
8308                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
8309                 ) AS estimated_amount,
8310                 (
8311                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8312                     FROM acq.lineitem_detail lid
8313                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8314                     WHERE debit.encumbrance AND lineitem = li.id
8315                 ) AS encumbrance_amount,
8316                 (
8317                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8318                     FROM acq.lineitem_detail lid
8319                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8320                     WHERE NOT debit.encumbrance AND lineitem = li.id
8321                 ) AS paid_amount
8322
8323                 FROM acq.lineitem AS li
8324         </oils_persist:source_definition>
8325                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
8326                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8327                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8328                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
8329                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
8330                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
8331                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
8332                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
8333                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
8334                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
8335                 </fields>
8336                 <links>
8337                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8338                 </links>
8339     </class>
8340
8341
8342         <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">
8343                 <oils_persist:source_definition>
8344
8345                         SELECT  t.*
8346                           FROM  action.transit_copy t
8347                                 JOIN actor.org_unit AS s ON (t.source = s.id)
8348                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
8349                           WHERE s.parent_ou &lt;&gt; d.parent_ou
8350
8351                 </oils_persist:source_definition>
8352                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8353                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
8354                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
8355                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8356                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
8357                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
8358                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
8359                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
8360                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8361                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8362                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8363                 </fields>
8364                 <links>
8365                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
8366                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8367                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8368                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8369                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8370                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
8371                 </links>
8372         </class>
8373
8374     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
8375                 <oils_persist:source_definition>
8376
8377         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
8378                 SELECT
8379                         cp.id as copy,
8380                         COUNT(circ.id),
8381                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8382                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8383                 FROM
8384                         asset.copy cp
8385                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
8386                 GROUP BY 1, 3, 4
8387                 UNION
8388                 SELECT
8389                         cp.id as copy,
8390                         COUNT(circ.id),
8391                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8392                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8393                 FROM
8394                         asset.copy cp
8395                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
8396                 GROUP BY 1, 3, 4
8397                 UNION
8398                 SELECT
8399                         id as copy,
8400                         circ_count,
8401                         -1 AS year,
8402                         false as is_renewal
8403                 FROM
8404                         extend_reporter.legacy_circ_count
8405         )x GROUP BY 1, 3, 4
8406
8407                 </oils_persist:source_definition>
8408         <fields>
8409             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
8410             <field reporter:label="Count" name="count" reporter:datatype="int"/>
8411             <field reporter:label="Year" name="year" reporter:datatype="int"/>
8412             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
8413         </fields>
8414                 <links>
8415                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8416                 </links>
8417                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8418                         <actions>
8419                                 <retrieve/>
8420                         </actions>
8421                 </permacrud>
8422     </class>
8423
8424         <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">
8425                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
8426                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
8427                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
8428                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
8429                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8430                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
8431                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
8432                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
8433                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
8434                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
8435                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
8436                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
8437                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
8438                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
8439                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
8440                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
8441                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
8442                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
8443                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
8444                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
8445                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
8446                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
8447                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
8448                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
8449                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
8450                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
8451                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
8452                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
8453                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
8454                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
8455                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
8456                 </fields>
8457                 <links>
8458                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
8459                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
8460                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
8461                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8462                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
8463                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8464                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8465                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
8466                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
8467                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
8468                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
8469                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
8470                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
8471                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
8472                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
8473                 </links>
8474         </class>
8475
8476     <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">
8477         <fields oils_persist:primary="id">
8478             <field reporter:label="Title" name="title" reporter:datatype="text"/>
8479             <field reporter:label="Author" name="author" reporter:datatype="text"/>
8480             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
8481             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
8482             <field reporter:label="Price" name="price" reporter:datatype="money"/>
8483             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8484             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
8485             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
8486             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8487             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
8488             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8489             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
8490             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
8491             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
8492             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8493             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8494             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8495             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8496             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
8497             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
8498             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
8499             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
8500             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8501             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
8502             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
8503             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
8504             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
8505             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
8506             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
8507             <field reporter:label="Status" name="status" reporter:datatype="link"/>
8508             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
8509             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
8510             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
8511             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
8512         </fields>
8513         <links>
8514             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8515             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8516             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8517             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8518             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8519         </links>
8520     </class>
8521
8522     <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">
8523         <fields oils_persist:primary="id">
8524             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8525             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8526             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8527             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8528         </fields>
8529         <links>
8530             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8531             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8532         </links>
8533     </class>
8534
8535     <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">
8536         <fields oils_persist:primary="owning_lib">
8537             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8538             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8539             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8540         </fields>
8541         <links>
8542             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8543         </links>
8544     </class>
8545
8546     <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">
8547         <fields oils_persist:primary="id">
8548             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8549             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8550             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8551             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8552             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8553         </fields>
8554         <links>
8555             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8556             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8557             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8558         </links>
8559     </class>
8560
8561     <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">
8562         <fields oils_persist:primary="circ_lib">
8563             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
8564             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8565             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8566             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8567         </fields>
8568         <links>
8569             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8570             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8571         </links>
8572     </class>
8573
8574     <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">
8575         <fields oils_persist:primary="id">
8576             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8577             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8578             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8579             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8580             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8581         </fields>
8582         <links>
8583             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8584             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8585             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8586         </links>
8587     </class>
8588
8589     <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">
8590         <fields oils_persist:primary="home_ou">
8591             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
8592             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8593             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
8594             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
8595         </fields>
8596         <links>
8597             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8598             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8599         </links>
8600     </class>
8601         <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">
8602                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
8603                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
8604                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
8605                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
8606                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
8607                 </fields>
8608                 <links>
8609                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8610                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
8611                 </links>
8612                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8613                         <actions>
8614                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8615                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
8616                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8617                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
8618                         </actions>
8619                 </permacrud>
8620         </class>
8621         <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">
8622                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
8623                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
8624                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
8625                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
8626                 </fields>
8627                 <links>
8628                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8629                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
8630                         </links>
8631                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8632                 <actions>
8633                                 <create permission="ADMIN_ACQ_FUND_TAG">
8634                                         <context link="tag" field="owner"/>
8635                                 </create>
8636                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8637                                         <context link="tag" field="owner"/>
8638                                 </retrieve>
8639                                 <update permission="ADMIN_ACQ_FUND_TAG">
8640                                         <context link="tag" field="owner"/>
8641                                 </update>
8642                                 <delete permission="ADMIN_ACQ_FUND_TAG">
8643                                         <context link="tag" field="owner"/>
8644                                 </delete>
8645                         </actions>
8646                 </permacrud>
8647         </class>
8648
8649         <!-- ********************************************************************************************************************* -->
8650
8651 </IDL>
8652
8653 <!--
8654     vim:noet:ts=4:sw=4:
8655 -->