]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1341013: Load apache mod CGI
[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           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <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">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                 </fields>
85                 <links>
86                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
87                 </links>
88         </class>
89
90         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
91                 <fields>
92                         <field name="workstation" oils_persist:virtual="true" />
93                         <field name="cash_payment" oils_persist:virtual="true" />
94                         <field name="check_payment" oils_persist:virtual="true" />
95                         <field name="credit_card_payment" oils_persist:virtual="true" />
96                 </fields>
97                 <links>
98                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
99                 </links>
100         </class>
101
102         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
103                 <fields>
104                         <field name="id" oils_persist:virtual="true" />
105                         <field name="children" oils_persist:virtual="true" />
106                         <field name="owner_doc" oils_persist:virtual="true" />
107                         <field name="intra_doc_id" oils_persist:virtual="true" />
108                         <field name="parent_node" oils_persist:virtual="true" />
109                         <field name="node_type" oils_persist:virtual="true" />
110                         <field name="namespace_uri" oils_persist:virtual="true" />
111                         <field name="name" oils_persist:virtual="true" />
112                         <field name="value" oils_persist:virtual="true" />
113                 </fields>
114         </class>
115
116         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
117                 <fields>
118                         <field name="title" oils_persist:virtual="true" />
119                         <field name="author" oils_persist:virtual="true" />
120                         <field name="doc_id" oils_persist:virtual="true" />
121                         <field name="doc_type" oils_persist:virtual="true" />
122                         <field name="pubdate" oils_persist:virtual="true" />
123                         <field name="isbn" oils_persist:virtual="true" />
124                         <field name="publisher" oils_persist:virtual="true" />
125                         <field name="tcn" oils_persist:virtual="true" />
126                         <field name="subject" oils_persist:virtual="true" />
127                         <field name="types_of_resource" oils_persist:virtual="true" />
128                         <field name="call_numbers" oils_persist:virtual="true" />
129                         <field name="edition" oils_persist:virtual="true" />
130                         <field name="online_loc" oils_persist:virtual="true" />
131                         <field name="synopsis" oils_persist:virtual="true" />
132                         <field name="physical_description" oils_persist:virtual="true" />
133                         <field name="toc" oils_persist:virtual="true" />
134                         <field name="copy_count" oils_persist:virtual="true" />
135                         <field name="series" oils_persist:virtual="true" />
136                         <field name="serials" oils_persist:virtual="true" />
137                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
142                 <fields>
143                         <field name="err_msg" oils_persist:virtual="true" />
144                         <field name="type" oils_persist:virtual="true" />
145                 </fields>
146         </class>
147
148         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
149                 <fields>
150                         <field name="err_msg" oils_persist:virtual="true" />
151                         <field name="type" oils_persist:virtual="true" />
152                 </fields>
153         </class>
154
155         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
156                 <fields oils_persist:primary="matchpoint">
157                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
158                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
159                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
160                 </fields>
161                 <links>
162                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
163                 </links>
164         </class>
165
166         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
167         <!-- when the time is right, turn me into a view.  -->
168                 <fields>
169             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
170             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
171             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
172             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
173             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
174             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
175             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
176             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
178             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
179                 </fields>
180         </class>
181
182         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
183                 <fields>
184                         <field name="public_name" oils_persist:virtual="true" />
185                         <field name="target_url" oils_persist:virtual="true" />
186                         <field name="target_coverage" oils_persist:virtual="true" />
187                         <field name="target_embargo" oils_persist:virtual="true" />
188                 </fields>
189         </class>
190
191         <!-- Actually in the DB -->
192         <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">
193                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
194                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
195                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
196                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
197                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
198                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
199                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
200                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
201                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
202                 </fields>
203                 <links>
204                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
205                 </links>
206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
207                         <actions>
208                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
209                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
210                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
211                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
212                         </actions>
213                 </permacrud>
214         </class>
215
216         <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">
217                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
218                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
219                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
220                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
221                 </fields>
222                 <links>
223                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
224                 </links>
225                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
226                         <actions>
227                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
228                     <context link="grp" field="owner"/>
229                 </create>
230                                 <retrieve/>
231                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
232                     <context link="grp" field="owner"/>
233                 </update>
234                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
235                     <context link="grp" field="owner"/>
236                 </delete>
237                         </actions>
238                 </permacrud>
239         </class>
240
241         <class  id="vibtg" 
242             controller="open-ils.cstore open-ils.pcrud" 
243             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
244             oils_persist:tablename="vandelay.import_bib_trash_group" 
245             reporter:label="Import/Overlay Field Groups for Removal">
246                 <fields oils_persist:primary="id" 
247                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
248                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
249                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
250                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
251                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
252                 </fields>
253                 <links>
254                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
255                 </links>
256                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
257                         <actions>
258                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
259                                 <retrieve/>
260                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
261                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266
267         <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">
268                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
269                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
270                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
271                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
272                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
273                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
274                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
275                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
276                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
277                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
278                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
279                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
280                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
281                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
282                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
283                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
284                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
285                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
286                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
287                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
288                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
289                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
290                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
291                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
292                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
293                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
294                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
295                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
296                 </fields>
297                 <links>
298                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
299                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
300                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
301                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
302                 </links>
303                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
304                         <actions>
305                                 <create permission="CREATE_IMPORT_ITEM">
306                     <context link="definition" field="owner"/>
307                                 </create>
308                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
309                     <context link="definition" field="owner"/>
310                                 </retrieve>
311                                 <update permission="UPDATE_IMPORT_ITEM">
312                     <context link="definition" field="owner"/>
313                                 </update>
314                                 <delete permission="DELETE_IMPORT_ITEM">
315                     <context link="definition" field="owner"/>
316                                 </delete>
317                         </actions>
318                 </permacrud>
319         </class>
320
321         <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">
322                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
323                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
324                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
325                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
326                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
327                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
328                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
329                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
330                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
331                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
332                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
333                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
334                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
335                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
336                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
337                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
338                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
339                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
340                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
341                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
342                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
343                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
344                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
345                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
346                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
347                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
348                 </fields>
349                 <links>
350                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
351                 </links>
352                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
353                         <actions>
354                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
355                                 <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"/>
356                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
357                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
358                         </actions>
359                 </permacrud>
360         </class>
361
362         <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">
363                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
364                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
365                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
366                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
367                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
368                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
369                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
370                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
371                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
372                 </fields>
373                 <links>
374                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
375                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
376                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
377                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
378                 </links>
379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
380                         <actions>
381                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
382                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
383                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
384                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
385                         </actions>
386                 </permacrud>
387         </class>
388
389         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
390                 <fields oils_persist:primary="code">
391                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
392                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
393                 </fields>
394                 <links>
395                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
396                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <retrieve/>
402                         </actions>
403                 </permacrud>
404         </class>
405
406         <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">
407                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
408                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
409                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
410                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
411                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
412                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
413                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
414                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
415                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
416                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
417                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
418                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
419                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
420                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
421                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
422                 </fields>
423                 <links>
424                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
425                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
426                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
427                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
428             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
429             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
430             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
431                 </links>
432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
433                         <actions>
434                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
435                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
436                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
437                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
438                         </actions>
439                 </permacrud>
440         </class>
441
442         <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">
443                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
444                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
445                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
446                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
447                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
448                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
449                 </fields>
450                 <links/>
451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
452                         <actions>
453                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
454                 <retrieve/>
455                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
456                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
457                         </actions>
458                 </permacrud>
459         </class>
460
461         <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">
462                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
463                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
464                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
465                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
466                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
467                 </fields>
468                 <links>
469                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
470                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
471                 </links>
472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
473                         <actions>
474                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
475                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
476                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
477                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
478                         </actions>
479                 </permacrud>
480         </class>
481
482         <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">
483                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
484                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
485                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
486                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
487                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
488                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
489                 </fields>
490                 <links>
491                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
492                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
493                 </links>
494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
495                         <actions>
496                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
497                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
498                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
499                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
500                         </actions>
501                 </permacrud>
502         </class>
503
504         <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">
505                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
506                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
507                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
508                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
509                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
510                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
511                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
512                 </fields>
513                 <links>
514                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
515                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
516                 </links>
517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
518                         <actions>
519                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
520                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
521                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
522                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
523                         </actions>
524                 </permacrud>
525         </class>
526
527         <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">
528                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
529                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
530                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
531                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
532                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
533                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
534                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
535                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
536                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
537                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
538                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
539                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
540                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
541                 </fields>
542                 <links>
543                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
544                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
545                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
546             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
547             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
548                 </links>
549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
550                         <actions>
551                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
552                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
553                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
554                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
555                         </actions>
556                 </permacrud>
557         </class>
558
559         <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">
560                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
561                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
562                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
563                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
564                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
565                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
566                 </fields>
567                 <links/>
568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
569                         <actions>
570                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
571                 <retrieve/>
572                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
573                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
574                         </actions>
575                 </permacrud>
576         </class>
577
578         <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">
579                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
580                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
581                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
582                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
583                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
584                 </fields>
585                 <links>
586                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
587                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
588                 </links>
589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
590                         <actions>
591                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
592                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
593                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
594                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
595                         </actions>
596                 </permacrud>
597         </class>
598
599         <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">
600                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
601                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
602                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
603                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
604                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
605                 </fields>
606                 <links>
607                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
608                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
609                 </links>
610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
611                         <actions>
612                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
613                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
614                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
615                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
616                         </actions>
617                 </permacrud>
618         </class>
619
620         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
621                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
622                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
623                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
624                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
625                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
626                 </fields>
627                 <links>
628                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
629                 </links>
630                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
631                         <actions>
632                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
633                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
634                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
635                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
636                         </actions>
637                 </permacrud>
638         </class>
639
640         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
641                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
642                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
643                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
644                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
645                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
646                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
647                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
648                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
649             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
650                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
651                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
652                 </fields>
653                 <links>
654                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
655                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
656                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
657                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
658                 </links>
659                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
660                         <actions>
661                                 <create permission="ADMIN_IMPORT_MATCH_SET">
662                     <context link="match_set" field="owner"/>
663                                 </create>
664                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
665                     <context link="match_set" field="owner"/>
666                                 </retrieve>
667                                 <update permission="ADMIN_IMPORT_MATCH_SET">
668                     <context link="match_set" field="owner"/>
669                                 </update>
670                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
671                     <context link="match_set" field="owner"/>
672                                 </delete>
673                         </actions>
674                 </permacrud>
675         </class>
676
677         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
678                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
679                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
680                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
681                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
682                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
683                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
684                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
685                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
686                 </fields>
687                 <links>
688                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
689                 </links>
690                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
691                         <actions>
692                                 <create permission="ADMIN_IMPORT_MATCH_SET">
693                     <context link="match_set" field="owner"/>
694                                 </create>
695                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
696                     <context link="match_set" field="owner"/>
697                                 </retrieve>
698                                 <update permission="ADMIN_IMPORT_MATCH_SET">
699                     <context link="match_set" field="owner"/>
700                                 </update>
701                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
702                     <context link="match_set" field="owner"/>
703                                 </delete>
704                         </actions>
705                 </permacrud>
706         </class>
707
708         <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">
709                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
710                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
711                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
712                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
713                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
714                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
715                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
716                 </fields>
717                 <links>
718                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
719                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
720                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
721                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
722                 </links>
723         </class>
724
725     <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">
726         <fields oils_persist:primary="name">
727             <field reporter:label="Name" name="name" reporter:datatype="text"/>
728             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
729             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
730             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
731         </fields>
732         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
733             <actions>
734                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
735                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
736                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
737                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
738             </actions>
739         </permacrud>
740     </class>
741
742     <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">
743         <fields oils_persist:primary="id">
744             <field reporter:label="ID" name="id" reporter:datatype="id"/>
745             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
746             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
747             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
748             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
749         </fields>
750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
751             <actions>
752                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
753                 <retrieve/>
754                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
755                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
756             </actions>
757         </permacrud>
758     </class>
759
760         <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">
761                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
762                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
763                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
764                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
765                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
766                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
767                 </fields>
768                 <links>
769                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
770                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
771                 </links>
772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
773             <actions>
774                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
775                 <retrieve/>
776                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
777                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
778             </actions>
779         </permacrud>
780         </class>
781
782         <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">
783                 <fields oils_persist:primary="name">
784                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
785                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
786                         <field reporter:label="Description" name="description" reporter:datatype="text" />
787                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
788                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
789                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
790                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
791                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
792                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
793                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
794                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
795                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
796                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
797                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
798                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
799                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
800                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
801                 </fields>
802                 <links>
803                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
804                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
805                 </links>
806         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
807             <actions>
808                 <create permission="ADMIN_SVF" global_required="true"/>
809                 <retrieve/>
810                 <update permission="ADMIN_SVF" global_required="true"/>
811                 <delete permission="ADMIN_SVF" global_required="true"/>
812             </actions>
813         </permacrud>
814         </class>
815
816         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
817                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
818                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
819                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
820                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
821             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
822                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
823                 </fields>
824                 <links/>
825         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
826             <actions>
827                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
828                 <retrieve/>
829                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
830                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
831             </actions>
832         </permacrud>
833         </class>
834
835         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
836                 <fields oils_persist:primary="coded_value">
837                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
838                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
839                 </fields>
840                 <links>
841                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
842                 </links>
843         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
844             <actions>
845                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
846                 <retrieve/>
847                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
848                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
849             </actions>
850         </permacrud>
851         </class>
852
853         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
854                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
855                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
856                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
857                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
858                 </fields>
859                 <links>
860                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
861                 </links>
862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
863             <actions>
864                 <retrieve/>
865             </actions>
866         </permacrud>
867         </class>
868
869
870         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
871                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
872                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
873                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
874                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
875                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
876                 </fields>
877                 <links>
878                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
879                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
880                 </links>
881         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
882             <actions>
883                 <retrieve/>
884             </actions>
885         </permacrud>
886         </class>
887
888
889         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
890                 <fields oils_persist:primary="source">
891                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
892                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
893                 </fields>
894                 <links>
895                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
896                 </links>
897         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
898             <actions>
899                 <retrieve/>
900             </actions>
901         </permacrud>
902         </class>
903
904         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
905                 <fields>
906                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
907                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
908                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
909                 </fields>
910                 <links>
911                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
912                 </links>
913         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
914             <actions>
915                 <retrieve/>
916             </actions>
917         </permacrud>
918         </class>
919
920         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true" oils_persist:readonly="true">
921                 <fields oils_persist:primary="id">
922                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
923                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
924                 </fields>
925                 <links>
926                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
927                 </links>
928         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
929             <actions>
930                 <retrieve/>
931             </actions>
932         </permacrud>
933         </class>
934
935         <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">
936                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
937                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
938                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
939                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
940                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
941                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
942                 </fields>
943                 <links>
944                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
945                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
946                 </links>
947         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
948             <actions>
949                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
950                 <retrieve/>
951                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
952                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
953             </actions>
954         </permacrud>
955         </class>
956
957         <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">
958                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
959                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
960                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
961                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
962                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
963                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
964                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
965                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
966             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
967             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
968                 </fields>
969                 <links>
970                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
971                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
972                 </links>
973         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
974             <actions>
975                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
976                 <retrieve/>
977                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
978                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
979             </actions>
980         </permacrud>
981         </class>
982
983         <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">
984                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
985                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
986                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
987                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
988                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
989                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
990                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
991                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
992                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
993                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
994                 </fields>
995                 <links>
996                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
997                 </links>
998         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
999             <actions>
1000                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1001                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1002                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1003                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1004             </actions>
1005         </permacrud>
1006         </class>
1007
1008     <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">
1009         <fields oils_persist:primary="name">
1010             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1011             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1012             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1013             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1014             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1015             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1016             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1017             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1018             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1019             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1020         </fields>
1021         <links>
1022             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1023             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1024         </links>
1025         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1026             <actions>
1027                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1028                 <retrieve/>
1029                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1030                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1031             </actions>
1032         </permacrud>
1033     </class>
1034
1035     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
1036         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1037             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1038             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1039             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1040             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1041             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1042             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1043             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1044         </fields>
1045         <links>
1046             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1047         </links>
1048         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1049             <actions>
1050                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1051                 <retrieve/>
1052                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1053                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1054             </actions>
1055         </permacrud>
1056     </class>
1057
1058     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1059                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1060                         oils_persist:tablename="config.z3950_index_field_map" 
1061                         reporter:label="Z39.50 Index Field Map">
1062         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1063             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1064             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1065             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1066             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1067             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1068             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1069         </fields>
1070         <links>
1071             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1072             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1073             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1074         </links>
1075         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1076             <actions>
1077                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1078                 <retrieve/>
1079                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1080                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1081             </actions>
1082         </permacrud>
1083     </class>
1084
1085
1086         <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">
1087                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1088                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1089                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1090                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1091                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1092                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1093                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1094                 </fields>
1095                 <links>
1096             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1097             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1098                 </links>
1099                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1100                         <actions>
1101                                 <retrieve/>
1102                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1103                         </actions>
1104                 </permacrud>
1105         </class>
1106
1107         <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">
1108                 <fields oils_persist:primary="key">
1109                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1110                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1111                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1112                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1113                 </fields>
1114                 <links/>
1115                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1116                         <actions>
1117                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1118                                 <retrieve/>
1119                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1120                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1121                         </actions>
1122                 </permacrud>
1123         </class>
1124
1125         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1126                 <fields oils_persist:primary="module">
1127                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1128                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1129                 </fields>
1130                 <links/>
1131         </class>
1132
1133         <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">
1134                 <fields oils_persist:primary="module">
1135                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1136                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1137                 </fields>
1138                 <links/>
1139                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1140                         <actions>
1141                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1142                                 <retrieve/>
1143                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1144                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1145                         </actions>
1146                 </permacrud>
1147         </class>
1148
1149         <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">
1150                 <fields oils_persist:primary="module">
1151                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1152                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1153                 </fields>
1154                 <links/>
1155                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1156                         <actions>
1157                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1158                                 <retrieve/>
1159                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1160                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1161                         </actions>
1162                 </permacrud>
1163         </class>
1164
1165         <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">
1166                 <fields oils_persist:primary="module">
1167                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1168                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1169                 </fields>
1170                 <links/>
1171                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1172                         <actions>
1173                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1174                                 <retrieve/>
1175                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1176                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1177                         </actions>
1178                 </permacrud>
1179         </class>
1180
1181         <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">
1182                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1183                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1184                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1185                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1186                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1187                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1188                 </fields>
1189                 <links>
1190                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1191                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1192                 </links>
1193                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1194                         <actions>
1195                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1196                     <context link="event_def" field="owner"/>
1197                 </create>
1198                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1199                     <context link="event_def" field="owner"/>
1200                 </retrieve>
1201                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1202                     <context link="event_def" field="owner"/>
1203                 </update>
1204                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1205                     <context link="event_def" field="owner"/>
1206                 </delete>
1207                         </actions>
1208                 </permacrud>
1209         </class>
1210
1211         <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">
1212                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1213                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1214                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1215                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1216                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1217                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1218                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1219                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1220                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1221                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1222                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1223                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1224                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1225                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1226                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1227                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1228                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1229                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1230                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1231                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1232                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1233                 </fields>
1234                 <links>
1235                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1236                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1237                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1238                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1239                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1240                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1241                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1242                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1243                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1244                 </links>
1245                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1246                         <actions>
1247                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1248                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1249                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1250                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1251                         </actions>
1252                 </permacrud>
1253         </class>
1254
1255         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1256                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1257                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1258                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1259                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1260                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1261                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1262                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1263                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1264                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1265                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1266                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1267                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1268                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1269                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1270                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1271                 </fields>
1272                 <links>
1273                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1274                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1275                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1276                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1277                 </links>
1278         </class>
1279
1280         <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">
1281                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1282                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1283                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1284                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1285                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1286                 </fields>
1287                 <links>
1288                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1289                 </links>
1290                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1291                         <actions>
1292                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1293                     <context link="event_def" field="owner"/>
1294                 </create>
1295                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1296                     <context link="event_def" field="owner"/>
1297                 </retrieve>
1298                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1299                     <context link="event_def" field="owner"/>
1300                 </update>
1301                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1302                     <context link="event_def" field="owner"/>
1303                 </delete>
1304                         </actions>
1305                 </permacrud>
1306         </class>
1307
1308         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1309                 <oils_persist:source_definition><![CDATA[
1310                 SELECT  atevdef.hook,
1311                         atevdef.name,
1312                         atevdef.reactor,
1313                         atev.id,
1314                         atev.event_def,
1315                         atev.add_time,
1316                         atev.run_time,
1317                         atev.start_time,
1318                         atev.update_time,
1319                         atev.complete_time,
1320                         atev.update_process,
1321                         atev.state,
1322                         atev.user_data,
1323                         atev.template_output,
1324                         atev.error_output,
1325                         atev.async_output,
1326                         targ_circ.id AS target_circ,
1327                         targ_ahr.id AS target_hold,
1328                         COALESCE(
1329                                 targ_circ.circ_lib,
1330                                 targ_ahr.pickup_lib
1331                         ) AS perm_lib
1332                 FROM action_trigger.event atev
1333                 JOIN action_trigger.event_definition atevdef ON
1334                         (atevdef.id = atev.event_def)
1335                 JOIN action_trigger.hook ath ON
1336                         (ath.key = atevdef.hook)
1337                 LEFT JOIN action.circulation targ_circ ON
1338                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1339                 LEFT JOIN action.hold_request targ_ahr ON
1340                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1341                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1342                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1343                                 'circ.staff.max_visible_event_age',
1344                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1345                         ) UNION
1346                         SELECT '1000 YEARS'::INTERVAL AS value
1347                 ) ous)
1348                 ]]></oils_persist:source_definition>
1349                 <fields oils_persist:primary="id">
1350                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1351                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1352                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1353                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1354                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1355                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1356                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1357                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1358                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1359                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1360                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1361                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1362                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1363                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1364                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1365                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1366                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1367                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1368                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1369                 </fields>
1370                 <links>
1371                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1372                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1373                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1374                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1375                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1376                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1377                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1378                 </links>
1379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1380                         <actions>
1381                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1382                         </actions>
1383                 </permacrud>
1384         </class>
1385
1386         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1387                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1388                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1389                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1390                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1391                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1392                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1393                 </fields>
1394                 <links>
1395                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1396                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1397                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1398                 </links>
1399         </class>
1400
1401         <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">
1402                 <fields oils_persist:primary="code">
1403                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1404                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1405                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1406                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1407                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1408                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1409                 </fields>
1410                 <links/>
1411         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1412             <actions>
1413                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1414                 <retrieve/>
1415                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1416                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1417             </actions>
1418         </permacrud>
1419         </class>
1420
1421         <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">
1422                 <fields oils_persist:primary="code">
1423                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1424                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1425                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1426                 </fields>
1427                 <links/>
1428         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1429             <actions>
1430                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1431                 <retrieve/>
1432                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1433                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1434             </actions>
1435         </permacrud>
1436         </class>
1437
1438         <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">
1439                 <fields oils_persist:primary="code">
1440                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1441                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1442                 </fields>
1443                 <links/>
1444         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1445             <actions>
1446                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1447                 <retrieve/>
1448                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1449                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1450             </actions>
1451         </permacrud>
1452         </class>
1453
1454         <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">
1455                 <fields oils_persist:primary="code">
1456                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1457                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1458                 </fields>
1459                 <links/>
1460         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1461             <actions>
1462                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1463                 <retrieve/>
1464                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1465                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1466             </actions>
1467         </permacrud>
1468         </class>
1469
1470         <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">
1471                 <fields oils_persist:primary="code">
1472                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1473                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1474                 </fields>
1475                 <links/>
1476         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1477             <actions>
1478                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1479                 <retrieve/>
1480                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1481                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1482             </actions>
1483         </permacrud>
1484         </class>
1485
1486         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1487                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1488                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1489                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1490                 </fields>
1491                 <links/>
1492         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1493             <actions>
1494                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1495                 <retrieve/>
1496                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1497                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1498             </actions>
1499         </permacrud>
1500         </class>
1501
1502         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1503                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1504                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1505                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1506                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1507                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1508                 </fields>
1509         <links>
1510             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1511             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1512             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1513         </links>
1514         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1515             <actions>
1516                 <create permission="UPDATE_COPY">
1517                     <context link="target_copy" field="circ_lib"/>
1518                 </create>
1519                 <retrieve/>
1520                 <update permission="UPDATE_COPY">
1521                     <context link="target_copy" field="circ_lib"/>
1522                 </update>
1523                 <delete permission="UPDATE_COPY">
1524                     <context link="target_copy" field="circ_lib"/>
1525                 </delete>
1526             </actions>
1527         </permacrud>
1528         </class>
1529
1530         <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">
1531                 <fields oils_persist:primary="code">
1532                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1533                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1534                 </fields>
1535                 <links/>
1536         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1537             <actions>
1538                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1539                 <retrieve/>
1540                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1541                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1542             </actions>
1543         </permacrud>
1544         </class>
1545
1546         <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">
1547                 <fields oils_persist:primary="code">
1548                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1549                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1550                 </fields>
1551                 <links/>
1552         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1553             <actions>
1554                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1555                 <retrieve/>
1556                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1557                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1558             </actions>
1559         </permacrud>
1560         </class>
1561
1562         <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">
1563                 <fields oils_persist:primary="code">
1564                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1565                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1566                 </fields>
1567                 <links/>
1568         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1569             <actions>
1570                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1571                 <retrieve/>
1572                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1573                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1574             </actions>
1575         </permacrud>
1576         </class>
1577
1578     <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">
1579         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1580             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1581             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1582             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1583             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1584             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1585             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1586             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1587             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1588             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1589             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1590             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1591             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1592             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1593             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1594             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1595             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1596             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1597         </fields>
1598         <links/>
1599         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1600             <actions>
1601                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1602                 <retrieve/>
1603                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1604                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1605             </actions>
1606         </permacrud>
1607     </class>
1608
1609     <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">
1610         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1611             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1612             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1613             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1614             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1615             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1616             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1617             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1618             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1619             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1620             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1621             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1622             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1623             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1624             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1625             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1626             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1627             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1628             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1629             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1630         </fields>
1631         <links/>
1632         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1633             <actions>
1634                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1635                 <retrieve/>
1636                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1637                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1638             </actions>
1639         </permacrud>
1640     </class>
1641
1642     <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">
1643         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1644             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1645             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1646             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1647             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1648             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1649         </fields>
1650         <links>
1651             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1652             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1653             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1654         </links>
1655         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1656             <actions>
1657                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1658                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1659                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1660                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1661             </actions>
1662         </permacrud>
1663     </class>
1664
1665         <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">
1666                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1667                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1668                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1669                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1670                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1671                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1672                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1673                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1674                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1675                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1676                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1677                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1678                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1679                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1680                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1681                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1682                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1683             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1684                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1685                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1686                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1687                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1688                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1689                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1690                 </fields>
1691                 <links>
1692                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1693                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1694                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1695                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1696                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1697                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1698                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1699                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1700                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1701                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1702                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1703                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1704                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1705             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1706                 </links>
1707         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1708             <actions>
1709                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1710                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1711                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1712                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1713             </actions>
1714         </permacrud>
1715         </class>
1716
1717         <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">
1718                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1719                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1720                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1721                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1722                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1723                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1724                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1725                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1726                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1727                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1728                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1729                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1730                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1731                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1732                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1733                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1734             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1735                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1736                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1737             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1738                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1739                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1740                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1741                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1742             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1743             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1744             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1745                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1746                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1747                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1748                 </fields>
1749                 <links>
1750                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1751                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1752                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1753                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1754                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1755                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1756                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1757                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1758                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1759                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1760                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1761                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1762                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1763                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1764             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1765                 </links>
1766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1767             <actions>
1768                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1769                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1770                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1771                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1772             </actions>
1773         </permacrud>
1774         </class>
1775
1776     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
1777         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1778             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1779             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1780             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1781         </fields>
1782         <links/>
1783         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1784             <actions>
1785                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1786                 <retrieve/>
1787                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1788                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1789             </actions>
1790         </permacrud>
1791     </class>
1792
1793     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
1794         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1795             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1796             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1797             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1798             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1799             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1800             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1801             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1802         </fields>
1803         <links>
1804             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1805         </links>
1806         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1807             <actions>
1808                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1809                 <retrieve/>
1810                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1811                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1812             </actions>
1813         </permacrud>
1814     </class>
1815
1816     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
1817         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1818             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1819             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1820             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1821             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1822             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1823         </fields>
1824         <links>
1825             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1826             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1827         </links>
1828         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1829             <actions>
1830                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1831                     <context link="matchpoint" field="org_unit"/>
1832                 </create>
1833                 <retrieve/>
1834                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1835                     <context link="matchpoint" field="org_unit"/>
1836                 </update>
1837                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1838                     <context link="matchpoint" field="org_unit"/>
1839                 </delete>
1840             </actions>
1841         </permacrud>
1842     </class>
1843
1844     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
1845         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1846             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1847             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1848             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1849         </fields>
1850         <links>
1851             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1852             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1853         </links>
1854         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1855             <actions>
1856                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1857                     <context link="limit_set" field="owning_lib"/>
1858                 </create>
1859                 <retrieve/>
1860                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1861                     <context link="limit_set" field="owning_lib"/>
1862                 </update>
1863                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1864                     <context link="limit_set" field="owning_lib"/>
1865                 </delete>
1866             </actions>
1867         </permacrud>
1868     </class>
1869     <class id="cclsacpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_copy_loc_map" oils_persist:tablename="config.circ_limit_set_copy_loc_map" reporter:label="Circulation Limit Set Copy Location Map">
1870         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1871             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1872             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1873             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1874         </fields>
1875         <links>
1876             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1877             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1878         </links>
1879         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1880             <actions>
1881                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1882                     <context link="limit_set" field="owning_lib"/>
1883                 </create>
1884                 <retrieve/>
1885                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1886                     <context link="limit_set" field="owning_lib"/>
1887                 </update>
1888                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1889                     <context link="limit_set" field="owning_lib"/>
1890                 </delete>
1891             </actions>
1892         </permacrud>
1893     </class>
1894
1895     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
1896         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1897             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1898             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1899             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1900             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1901         </fields>
1902         <links>
1903             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1904             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1905         </links>
1906         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1907             <actions>
1908                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1909                     <context link="limit_set" field="owning_lib"/>
1910                 </create>
1911                 <retrieve/>
1912                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1913                     <context link="limit_set" field="owning_lib"/>
1914                 </update>
1915                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1916                     <context link="limit_set" field="owning_lib"/>
1917                 </delete>
1918             </actions>
1919         </permacrud>
1920     </class>
1921
1922         <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">
1923                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1924                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1925                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1926                 </fields>
1927                 <links/>
1928         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1929             <actions>
1930                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1931                 <retrieve/>
1932                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1933                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1934             </actions>
1935         </permacrud>
1936         </class>
1937
1938         <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">
1939                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1940                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1941                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1942                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1943                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1944                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1945                 </fields>
1946                 <links>
1947                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1948                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1949                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1950                 </links>
1951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1952             <actions>
1953                 <create permission="ADMIN_SURVEY">
1954                     <context link="survey" field="owner"/>
1955                 </create>
1956                 <retrieve/>
1957                 <update permission="ADMIN_SURVEY">
1958                     <context link="survey" field="owner"/>
1959                 </update>
1960                 <delete permission="ADMIN_SURVEY">
1961                     <context link="survey" field="owner"/>
1962                 </delete>
1963             </actions>
1964         </permacrud>
1965         </class>
1966         <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">
1967                 <fields oils_persist:primary="id" oils_persist:sequence="">
1968                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1969                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1970                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1971                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1972                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1973                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1974                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1975                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1976                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1977                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1978                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1979                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1980                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1981                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1982                 </fields>
1983                 <links>
1984                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1985                 </links>
1986         </class>
1987         <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">
1988                 <fields oils_persist:primary="id" oils_persist:sequence="">
1989                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1990                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1991                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1992                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1993                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1994                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1995                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1996                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1997                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1998                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1999                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2000                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2001                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2002                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2003                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2004                 </fields>
2005                 <links>
2006                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2007                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2008                 </links>
2009         </class>
2010         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2011                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2012                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2013                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2014                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2015                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2016                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2017                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2018                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2019                 </fields>
2020                 <links>
2021                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2022                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2023                 </links>
2024         </class>
2025         <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">
2026                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2027                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2028                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2029                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2030                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2031                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2032                 </fields>
2033                 <links>
2034                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2035                 </links>
2036         </class>
2037         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2038                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2039                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2040                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2041                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2042                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2043                 </fields>
2044                 <links>
2045                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2046                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2047                 </links>
2048         </class>
2049         <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">
2050                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2051                         <field name="field" reporter:datatype="link"/>
2052                         <field name="id" reporter:datatype="id" />
2053                         <field name="source" reporter:datatype="link"/>
2054                         <field name="value" reporter:datatype="text"/>
2055                 </fields>
2056                 <links>
2057                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2058                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2059                 </links>
2060         </class>
2061         <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">
2062                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2063                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2064                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2065                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2066                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2067                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2068                 </fields>
2069                 <links>
2070                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2071                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2072                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2073                 </links>
2074         </class>
2075         <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">
2076                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2077                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2078                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2079                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2080                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2081                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2082                 </fields>
2083                 <links>
2084                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2085                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2086                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2087                 </links>
2088         </class>
2089         <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">
2090                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2091                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2092                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2093                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2094                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2095                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2096                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2097                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2098                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2099                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2100                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2101                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2102                 </fields>
2103                 <links>
2104                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2105                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2106                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2107                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2108                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2109                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2110                 </links>
2111         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2112             <actions>
2113                 <create permission="TRANSIT_COPY" context_field="owner">
2114                     <context link="target_copy" field="circ_lib"/>
2115                 </create>
2116                 <retrieve/>
2117                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2118                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2119             </actions>
2120         </permacrud>
2121         </class>
2122         <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">
2123                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2124                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2125                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2126                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2127                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2128                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2129                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2130                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2131                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2132                 </fields>
2133                 <links>
2134                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2135                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2136                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2137                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2138                 </links>
2139         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2140             <actions>
2141                 <create permission="ADMIN_SURVEY">
2142                     <context link="survey" field="owner"/>
2143                 </create>
2144                 <retrieve/>
2145                 <update permission="ADMIN_SURVEY">
2146                     <context link="survey" field="owner"/>
2147                 </update>
2148                 <delete permission="ADMIN_SURVEY">
2149                     <context link="survey" field="owner"/>
2150                 </delete>
2151             </actions>
2152         </permacrud>
2153         </class>
2154         <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">
2155                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2156                         <field name="bucket" />
2157                         <field name="id" reporter:datatype="id" />
2158                         <field name="target_copy" reporter:datatype="link"/>
2159                         <field name="create_time" reporter:datatype="timestamp" />
2160                         <field name="pos" reporter:datatype="int" />
2161                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2162                 </fields>
2163                 <links>
2164                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2165                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2166             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2167                 </links>
2168         </class>
2169         <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">
2170                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2171                         <field name="id" reporter:datatype="id" />
2172                         <field name="item" reporter:datatype="link"/>
2173                         <field name="note" reporter:datatype="text" />
2174                 </fields>
2175                 <links>
2176                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2177                 </links>
2178         </class>
2179
2180         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
2181                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2182                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2183                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2184                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2185                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2186                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2187                 </fields>
2188                 <links>
2189                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2190                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2191                 </links>
2192                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2193                         <actions>
2194                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2195                                 <retrieve/>
2196                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2197                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2198                         </actions>
2199                 </permacrud>
2200         </class>
2201
2202         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
2203                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2204                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2205                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2206                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2207                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2208                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2209                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2210                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2211                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2212                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2213                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2214                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2215                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2216                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2217                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2218                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2219                 </fields>
2220                 <links>
2221                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2222                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2223                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2224                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2225                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2226                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2227                 </links>
2228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2229                         <actions>
2230                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2231                                 <retrieve/>
2232                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2233                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2234                         </actions>
2235                 </permacrud>
2236         </class>
2237
2238         <class id="acsbf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field" oils_persist:tablename="authority.control_set_bib_field" reporter:label="Authority Control Set Bib Field" oils_persist:field_safe="true">
2239                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2240                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2241                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2242                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2243                 </fields>
2244                 <links>
2245                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2246                 </links>
2247                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2248                         <actions>
2249                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2250                                 <retrieve/>
2251                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2252                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2253                         </actions>
2254                 </permacrud>
2255         </class>
2256
2257         <class id="acsbfmfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field_metabib_field_map" oils_persist:tablename="authority.control_set_bib_field_metabib_field_map" reporter:label="Authority Control Set Bib Field to Metabib Field Map" oils_persist:field_safe="true">
2258                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2259                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2260                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2261                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2262                 </fields>
2263                 <links>
2264                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2265                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2266                 </links>
2267                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2268                         <actions>
2269                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2270                                 <retrieve/>
2271                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2272                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2273                         </actions>
2274                 </permacrud>
2275         </class>
2276
2277         <class id="at" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::thesaurus" oils_persist:tablename="authority.thesaurus" reporter:label="Authority Thesaurus" oils_persist:field_safe="true">
2278                 <fields oils_persist:primary="code">
2279                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2280                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2281                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2282                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2283                 </fields>
2284                 <links>
2285                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2286                 </links>
2287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2288                         <actions>
2289                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2290                                 <retrieve/>
2291                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2292                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2293                         </actions>
2294                 </permacrud>
2295         </class>
2296
2297         <class id="aba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis" oils_persist:tablename="authority.browse_axis" reporter:label="Authority Browse Axis" oils_persist:field_safe="true">
2298                 <fields oils_persist:primary="code">
2299                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2300                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2301                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2302                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2303                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2304                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2305                 </fields>
2306                 <links>
2307                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2308                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2309                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2310                 </links>
2311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2312                         <actions>
2313                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2314                                 <retrieve/>
2315                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2316                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2317                         </actions>
2318                 </permacrud>
2319         </class>
2320
2321     <class id="abaafm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis_authority_field_map" oils_persist:tablename="authority.browse_axis_authority_field_map" reporter:label="Authority Browse Axis Field Map" oils_persist:field_safe="true">
2322         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2323             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2324             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2325             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2326         </fields>
2327         <links>
2328             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2329             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2330         </links>
2331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2332             <actions>
2333                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2334                 <retrieve/>
2335                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2336                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2337             </actions>
2338         </permacrud>
2339     </class>
2340
2341         <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">
2342                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2343                         <field name="active" reporter:datatype="bool"/>
2344                         <field name="create_date" reporter:datatype="timestamp"/>
2345                         <field name="creator" />
2346                         <field name="deleted" reporter:datatype="bool"/>
2347                         <field name="edit_date" reporter:datatype="timestamp"/>
2348                         <field name="editor" />
2349                         <field name="id" reporter:datatype="id" />
2350                         <field name="last_xact_id" />
2351                         <field name="marc" />
2352                         <field name="source" />
2353                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2354                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2355                         <field name="heading" />
2356                         <field name="simple_heading" />
2357                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2358                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2359                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2360                 </fields>
2361                 <links>
2362                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2363                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2364                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2365                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2366                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2367                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2368                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2369                 </links>
2370                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2371                         <actions>
2372                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2373                                 <retrieve/>
2374                                 <update permission="UPDATE_MARC" global_required="true"/>
2375                                 <delete permission="UPDATE_MARC" global_required="true"/>
2376                         </actions>
2377                 </permacrud>
2378         </class>
2379         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2380                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2381                         <field name="char_encoding" />
2382                         <field name="id" />
2383                         <field name="record" />
2384                         <field name="record_status" />
2385                         <field name="thesaurus" />
2386                 </fields>
2387                 <links>
2388                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2389                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2390                 </links>
2391         </class>
2392         <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">
2393                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2394                         <field name="id" reporter:datatype="id" />
2395                         <field name="bib" reporter:datatype="link" />
2396                         <field name="authority" reporter:datatype="link" />
2397                 </fields>
2398                 <links>
2399                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2400                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2401                 </links>
2402         </class>
2403         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2404                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2405                         <field name="id" reporter:datatype="id" />
2406                         <field name="record" reporter:datatype="link" />
2407                         <field name="atag" reporter:datatype="link" />
2408                         <field name="value" reporter:datatype="text" />
2409                 </fields>
2410                 <links>
2411                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2412                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2413                 </links>
2414         </class>
2415         <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">
2416                 <fields oils_persist:primary="code" oils_persist:sequence="">
2417                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2418                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2419                 </fields>
2420                 <links/>
2421         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2422             <actions>
2423                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2424                 <retrieve/>
2425                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2426                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2427             </actions>
2428         </permacrud>
2429         </class>
2430         <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">
2431                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2432                         <field name="accepting_usr" />
2433                         <field name="amount" reporter:datatype="money" />
2434                         <field name="amount_collected" reporter:datatype="money" />
2435                         <field name="approval_code" reporter:datatype="text"/>
2436                         <field name="cash_drawer" reporter:datatype="link"/>
2437                         <field name="cc_first_name" reporter:datatype="text"/>
2438                         <field name="cc_last_name" reporter:datatype="text"/>
2439                         <field name="cc_number" reporter:datatype="text"/>
2440                         <field name="cc_order_number" reporter:datatype="text"/>
2441                         <field name="cc_type" reporter:datatype="text"/>
2442                         <field name="cc_processor" reporter:datatype="text"/>
2443                         <field name="expire_month" reporter:datatype="int" />
2444                         <field name="expire_year" reporter:datatype="int" />
2445                         <field name="id" reporter:datatype="id" />
2446                         <field name="note" reporter:datatype="text"/>
2447                         <field name="payment_ts" reporter:datatype="timestamp"/>
2448                         <field name="xact" reporter:datatype="link"/>
2449                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2450                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2451                 </fields>
2452                 <links>
2453                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2454                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2455                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2456                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2457                 </links>
2458         </class>
2459         <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">
2460                 <fields oils_persist:primary="name">
2461                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2462                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2463                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2464                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2465                 </fields>
2466                 <links/>
2467         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2468             <actions>
2469                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2470                 <retrieve/>
2471                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2472                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2473             </actions>
2474         </permacrud>
2475         </class>
2476
2477         <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">
2478                 <fields oils_persist:primary="alias">
2479                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2480                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2481                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2482                 </fields>
2483                 <links>
2484                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2485                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2486                 </links>
2487         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2488             <actions>
2489                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2490                 <retrieve/>
2491                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2492                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2493             </actions>
2494         </permacrud>
2495         </class>
2496
2497         <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">
2498                 <fields oils_persist:primary="name">
2499                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2500                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2501                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2502                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2503                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2504                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2505                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2506                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2507                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2508                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2509                 </fields>
2510                 <links>
2511                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2512                 </links>
2513         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2514             <actions>
2515                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2516                 <retrieve/>
2517                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2518                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2519             </actions>
2520         </permacrud>
2521         </class>
2522
2523         <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">
2524                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2525                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2526                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2527                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2528                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2529                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2530                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2531                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2532                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2533                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2534                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2535                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2536                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2537                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2538                 </fields>
2539                 <links>
2540                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2541                 </links>
2542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2543             <actions>
2544                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2545                 <retrieve/>
2546                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2547                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2548             </actions>
2549         </permacrud>
2550         </class>
2551         <class id="cbho" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::best_hold_order" oils_persist:tablename="config.best_hold_order" reporter:label="Best-Hold Sort Order">
2552                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2553                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2554                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2555                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2556                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2557                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2558                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2559                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2560                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2561                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2562                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2563                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2564                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2565                 </fields>
2566                 <links>
2567                 </links>
2568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2569                         <actions>
2570                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2571                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2572                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2573                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2574                         </actions>
2575                 </permacrud>
2576         </class>
2577         <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">
2578                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2579                         <field name="id" reporter:datatype="id" />
2580                         <field name="name" reporter:datatype="text"/>
2581                         <field name="xpath" reporter:datatype="text"/>
2582                         <field name="format" reporter:datatype="link"/>
2583                         <field name="first_word" reporter:datatype="bool" />
2584                 </fields>
2585                 <links/>
2586         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2587             <actions>
2588                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2589                 <retrieve/>
2590                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2591                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2592             </actions>
2593         </permacrud>
2594         </class>
2595         <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">
2596                 <fields oils_persist:primary="code" oils_persist:sequence="">
2597                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2598                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2599                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2600                 </fields>
2601                 <links/>
2602         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2603             <actions>
2604                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2605                 <retrieve/>
2606                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2607                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2608             </actions>
2609         </permacrud>
2610         </class>
2611         <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">
2612                 <fields oils_persist:primary="code" oils_persist:sequence="">
2613                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2614                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2615                 </fields>
2616                 <links/>
2617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2618             <actions>
2619                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2620                 <retrieve/>
2621                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2622                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2623             </actions>
2624         </permacrud>
2625         </class>
2626     <class id="acnc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
2627         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2628             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2629             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2630             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2631             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2632         </fields>
2633         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2634             <actions>
2635                 <retrieve/>
2636             </actions>
2637         </permacrud>
2638     </class>
2639         <class id="acns" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_suffix" oils_persist:tablename="asset.call_number_suffix" reporter:label="Call Number/Volume Suffix">
2640                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2641                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2642                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2643                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2644                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2645                 </fields>
2646                 <links>
2647                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2648                 </links>
2649         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2650             <actions>
2651                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2652                 <retrieve/>
2653                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2654                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2655             </actions>
2656         </permacrud>
2657         </class>
2658         <class id="acnp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_prefix" oils_persist:tablename="asset.call_number_prefix" reporter:label="Call Number/Volume Prefix">
2659                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2660                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2661                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2662                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2663                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2664                 </fields>
2665                 <links>
2666                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2667                 </links>
2668         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2669             <actions>
2670                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2671                 <retrieve/>
2672                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2673                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2674             </actions>
2675         </permacrud>
2676         </class>
2677         <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">
2678                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2679                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2680                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2681                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2682                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2683                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2684                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2685                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2686                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2687                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2688                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2689                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2690                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2691                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2692                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2693                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2694                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2695                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2696                 </fields>
2697                 <links>
2698                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2699                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2700                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2701                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2702                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2703                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2704                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2705                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2706                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2707                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2708                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2709                 </links>
2710         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2711             <actions>
2712                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2713                 <retrieve/>
2714                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2715                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2716             </actions>
2717         </permacrud>
2718         </class>
2719         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2720                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2721                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2722                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2723                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2724                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2725                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2726                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2727                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2728                 </fields>
2729                 <links>
2730                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2731                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2732         </links>
2733         </class>
2734         <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">
2735                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2736                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2737                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2738                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2739                 </fields>
2740                 <links>
2741                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2742                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2743                 </links>
2744         </class>
2745         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2746                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2747                         <field name="id" reporter:datatype="id" />
2748                         <field name="value" oils_persist:i18n="true" />
2749                 </fields>
2750                 <links/>
2751         </class>
2752         <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">
2753                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2754                         <field name="balance_owed" reporter:datatype="money" />
2755                         <field name="total_owed" reporter:datatype="money" />
2756                         <field name="total_paid" reporter:datatype="money" />
2757                         <field name="usr" reporter:datatype="link"/>
2758                 </fields>
2759                 <links>
2760                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2761         </links>
2762         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2763             <actions>
2764                 <retrieve permission="VIEW_USER">
2765                     <context link="usr" field="home_ou"/>
2766                 </retrieve>
2767             </actions>
2768         </permacrud>
2769         </class>
2770         <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">
2771                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2772                         <field name="collector" />
2773                         <field name="enter_time" reporter:datatype="timestamp"/>
2774                         <field name="id" reporter:datatype="id" />
2775                         <field name="location" reporter:datatype="link"/>
2776                         <field name="usr" reporter:datatype="link"/>
2777                 </fields>
2778                 <links>
2779                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2780                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2781                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2782                 </links>
2783         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2784             <actions>
2785                 <create permission="money.collections_tracker.create" context_field="location"/>
2786                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2787                 <delete permission="money.collections_tracker.create" context_field="location"/>
2788             </actions>
2789         </permacrud>
2790         </class>
2791         <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">
2792                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2793                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2794                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2795                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2796                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2797                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2798                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2799                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2800                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2801                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2802                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2803                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2804                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2805                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2806                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2807                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2808                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2809                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2810                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2811                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2812                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2813                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2814                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2815                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2816                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2817                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2818                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2819                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2820                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2821                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2822                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2823                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2824                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2825                 </fields>
2826                 <links>
2827                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2828                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2829                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2830                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2831                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2832                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2833                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2834                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2835                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2836                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2837                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2838                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2839                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2840                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2841                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2842                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2843                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2844                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2845                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2846                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2847                 </links>
2848         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2849             <actions>
2850                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2851                 <retrieve/>
2852                 <update permission="UPDATE_MARC" global_required="true"/>
2853             </actions>
2854         </permacrud>
2855         </class>
2856         <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">
2857                 <fields oils_persist:primary="id">
2858                         <field name="dow_0_close" />
2859                         <field name="dow_0_open" />
2860                         <field name="dow_1_close" />
2861                         <field name="dow_1_open" />
2862                         <field name="dow_2_close" />
2863                         <field name="dow_2_open" />
2864                         <field name="dow_3_close" />
2865                         <field name="dow_3_open" />
2866                         <field name="dow_4_close" />
2867                         <field name="dow_4_open" />
2868                         <field name="dow_5_close" />
2869                         <field name="dow_5_open" />
2870                         <field name="dow_6_close" />
2871                         <field name="dow_6_open" />
2872                         <field name="id" reporter:datatype="id" />
2873                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2874                 </fields>
2875                 <links>
2876                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2877                 </links>
2878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2879             <actions>
2880                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2881                 <retrieve/>
2882                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2883                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2884             </actions>
2885         </permacrud>
2886         </class>
2887         <class id="bmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::monograph_part" oils_persist:tablename="biblio.monograph_part" reporter:label="Monograph Parts" oils_persist:field_safe="true">
2888                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2889                         <field name="id" reporter:datatype="id" />
2890                         <field name="record" reporter:datatype="link"/>
2891                         <field name="label" reporter:datatype="text"/>
2892                         <field name="label_sortkey" reporter:datatype="text"/>
2893                 </fields>
2894                 <links>
2895                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2896                 </links>
2897         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2898             <actions>
2899                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2900                 <retrieve/>
2901                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2902                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2903             </actions>
2904         </permacrud>
2905         </class>
2906         <class id="acpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_part_map" oils_persist:tablename="asset.copy_part_map" reporter:label="Copy Monograph Part Map">
2907                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2908                         <field name="id" reporter:datatype="id" />
2909                         <field name="target_copy" reporter:datatype="link" />
2910                         <field name="part" reporter:datatype="link"/>
2911                 </fields>
2912                 <links>
2913                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2914                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2915                 </links>
2916         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2917             <actions>
2918                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2919                 <retrieve/>
2920                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2921                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2922             </actions>
2923         </permacrud>
2924         </class>
2925         <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">
2926                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2927                         <field name="close_end" reporter:datatype="timestamp" />
2928                         <field name="close_start" reporter:datatype="timestamp" />
2929                         <field name="id" reporter:datatype="id" />
2930                         <field name="org_unit" reporter:datatype="org_unit"/>
2931                         <field name="reason" reporter:datatype="text"/>
2932                 </fields>
2933                 <links>
2934                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2935                 </links>
2936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2937             <actions>
2938                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2939                 <retrieve/>
2940                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2941                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2942             </actions>
2943         </permacrud>
2944         </class>
2945         <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">
2946                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2947                         <field name="extended" reporter:datatype="interval"/>
2948                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2949                         <field name="max_renewals" reporter:datatype="int" />
2950                         <field name="name" reporter:datatype="text"/>
2951                         <field name="normal" reporter:datatype="interval"/>
2952                         <field name="shrt" reporter:datatype="interval"/>
2953                 </fields>
2954                 <links>
2955                 </links>
2956         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2957             <actions>
2958                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2959                 <retrieve/>
2960                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2961                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2962             </actions>
2963         </permacrud>
2964         </class>
2965
2966         <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">
2967                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2968                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2969                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2970             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2971                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2972             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2973                 </fields>
2974                 <links>
2975             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2976                 </links>
2977                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2978             <actions>
2979                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2980                 <retrieve/>
2981                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2982                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2983             </actions>
2984                 </permacrud>
2985         </class>
2986
2987         <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">
2988                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2989                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2990                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2991                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2992             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2993                 </fields>
2994                 <links>
2995                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2996                 </links>
2997                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2998             <actions>
2999                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3000                 <retrieve/>
3001                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3002                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3003             </actions>
3004                 </permacrud>
3005         </class>
3006
3007         <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">
3008                 <fields oils_persist:primary="id" oils_persist:sequence="">
3009                         <field name="balance_owed" reporter:datatype="money"/>
3010                         <field name="id" reporter:datatype="id" />
3011                         <field name="last_billing_note" reporter:datatype="text"/>
3012                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3013                         <field name="last_billing_type" reporter:datatype="text"/>
3014                         <field name="last_payment_note" reporter:datatype="text"/>
3015                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3016                         <field name="last_payment_type" reporter:datatype="text"/>
3017                         <field name="total_owed" reporter:datatype="money"/>
3018                         <field name="total_paid" reporter:datatype="money"/>
3019                         <field name="usr" reporter:datatype="link"/>
3020                         <field name="xact_finish" reporter:datatype="timestamp" />
3021                         <field name="xact_start" reporter:datatype="timestamp" />
3022                         <field name="xact_type" reporter:datatype="text"/>
3023                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3024                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3025                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3026                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3027                         <field name="billing_location" reporter:datatype="link"/>
3028                 </fields>
3029                 <links>
3030                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3031                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3032                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3033                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3034                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3035                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3036                 </links>
3037         </class>
3038         <class id="au" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
3039                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3040                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3041                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3042                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3043                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3044                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3045                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3046                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3047                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3048                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3049                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3050                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3051                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3052                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3053                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3054                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3055                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3056                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3057                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3058                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3059                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3060                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3061                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3062                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3063                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3064                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3065                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3066                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3067                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3068                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3069                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3070                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3071                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3072                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3073                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3074                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3075                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3076                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3077                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3078                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3079                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3080                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3081                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3082                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3083                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3084                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3085                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3086                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3087                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3088                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3089                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3090                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3091                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3092                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3093                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3094                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3095                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3096                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3097                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3098                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3099                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3100                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3101                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3102                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3103                 </fields>
3104                 <links>
3105                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3106                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3107                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3108                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3109                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3110                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3111                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3112                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3113                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3114                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3115                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3116                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3117                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3118                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3119                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3120                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3121                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3122                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3123                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3124                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3125                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3126                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3127                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3128                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3129                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3130                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3131                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3132                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3133                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3134                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3135                 </links>
3136                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3137                         <actions>
3138                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3139                         </actions>
3140                 </permacrud>
3141         </class>
3142         <class id="cuat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_activity_type" oils_persist:tablename="config.usr_activity_type" reporter:label="User Activity Type">
3143                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3144                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3145                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3146                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3147                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3148                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3149                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3150                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3151                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3152         </fields>
3153                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3154                         <actions>
3155                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3156                                 <retrieve/>
3157                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3158                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3159                         </actions>
3160                 </permacrud>
3161         </class>
3162         <class id="auact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_activity" oils_persist:tablename="actor.usr_activity" reporter:label="User Activity">
3163                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3164                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3165                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3166                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3167                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3168         </fields>
3169         <links>
3170                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3171                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3172                 </links>
3173                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3174                         <actions>
3175                                 <retrieve permission="RUN_REPORTS">
3176                                         <context link="usr" field="home_ou" />
3177                                 </retrieve>
3178                         </actions>
3179                 </permacrud>
3180         </class>
3181         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3182                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3183                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3184                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3185                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3186                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3187                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3188                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3189         </fields>
3190         <links>
3191                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3192                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3193                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3194                 </links>
3195                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3196                         <actions>
3197                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3198                                         <context link="usr" field="home_ou" />
3199                                         <context link="ws" field="owning_lib" />
3200                                 </retrieve>
3201                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3202                                         <context link="usr" field="home_ou" />
3203                                         <context link="ws" field="owning_lib" />
3204                                 </create>
3205                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3206                                         <context link="usr" field="home_ou" />
3207                                         <context link="ws" field="owning_lib" />
3208                                 </update>
3209                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3210                                         <context link="usr" field="home_ou" />
3211                                         <context link="ws" field="owning_lib" />
3212                                 </delete>
3213                         </actions>
3214                 </permacrud>
3215         </class>
3216         <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">
3217                 <fields oils_persist:primary="name">
3218                         <field name="name" reporter:datatype="text"/>
3219                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3220                 </fields>
3221                 <links/>
3222                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3223                         <actions>
3224                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3225                                 <retrieve/>
3226                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3227                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3228                         </actions>
3229                 </permacrud>
3230         </class>
3231         <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">
3232                 <fields oils_persist:primary="name">
3233                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3234                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3235                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3236                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3237                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3238                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3239                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3240                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3241                 </fields>
3242                 <links>
3243                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3244                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3245                 </links>
3246                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3247                         <actions>
3248                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3249                                 <retrieve/>
3250                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3251                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3252                         </actions>
3253                 </permacrud>
3254         </class>
3255         <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">
3256                 <fields oils_persist:primary="name">
3257                         <field name="name" reporter:datatype="text"/>
3258                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3259                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3260                         <field name="datatype" reporter:datatype="text"/>
3261                         <field name="view_perm" reporter:datatype="link"/>
3262                         <field name="update_perm" reporter:datatype="link"/>
3263                         <field name="fm_class" reporter:datatype="text"/>
3264                         <field name="grp" reporter:datatype="link"/>
3265                 </fields>
3266                 <links>
3267                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3268                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3269                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3270                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3271                 </links>
3272                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3273                         <actions>
3274                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3275                                 <retrieve/>
3276                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3277                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3278                         </actions>
3279                 </permacrud>
3280         </class>
3281         <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">
3282                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3283                         <field name="id" />
3284                         <field name="name"  reporter:datatype="text"/>
3285                         <field name="org_unit" reporter:datatype="org_unit"/>
3286                         <field name="value"  reporter:datatype="text"/>
3287                 </fields>
3288                 <links>
3289                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3290                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3291                 </links>
3292         </class>
3293         <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">
3294                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3295                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3296                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3297                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3298                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3299                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3300                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3301                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3302                 </fields>
3303                 <links>
3304                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3305                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3306                 </links>
3307         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3308             <actions>
3309                 <create permission="CREATE_COPY_NOTE">
3310                     <context link="owning_copy" field="circ_lib"/>
3311                 </create>
3312                 <retrieve permission="VIEW_COPY_NOTES">
3313                     <context link="owning_copy" field="circ_lib"/>
3314                 </retrieve>
3315                 <update permission="UPDATE_COPY_NOTE">
3316                     <context link="owning_copy" field="circ_lib"/>
3317                 </update>
3318                 <delete permission="DELETE_COPY_NOTE">
3319                     <context link="owning_copy" field="circ_lib"/>
3320                 </delete>
3321             </actions>
3322         </permacrud>
3323         </class>
3324         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3325                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3326                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3327                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3328                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3329                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3330                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3331                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3332                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3333                 </fields>
3334                 <links>
3335                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3336                 </links>
3337         </class>
3338         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3339                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3340                         <field name="fingerprint"  reporter:datatype="text"/>
3341                         <field name="id" reporter:datatype="id" />
3342                         <field name="master_record" reporter:datatype="link"/>
3343                         <field name="mods"  reporter:datatype="text"/>
3344                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3345                 </fields>
3346                 <links>
3347                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3348                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3349                 </links>
3350         </class>
3351         <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">
3352                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3353                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3354                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3355                 </fields>
3356                 <links/>
3357         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3358             <actions>
3359                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3360                 <retrieve/>
3361                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3362                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3363             </actions>
3364         </permacrud>
3365         </class>
3366         <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">
3367                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3368                         <field name="code"  reporter:datatype="text"/>
3369                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3370                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3371                 </fields>
3372                 <links/>
3373         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3374             <actions>
3375                 <create permission="CREATE_PERM" global_required="true"/>
3376                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3377                 <update permission="UPDATE_PERM" global_required="true"/>
3378                 <delete permission="DELETE_PERM" global_required="true"/>
3379             </actions>
3380         </permacrud>
3381         </class>
3382         <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">
3383                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3384                         <field name="id" reporter:datatype="id" />
3385                         <field name="metarecord" reporter:datatype="link"/>
3386                         <field name="source" reporter:datatype="link"/>
3387                 </fields>
3388                 <links>
3389                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3390                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3391                 </links>
3392         </class>
3393         <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">
3394                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3395                         <field name="id" reporter:datatype="id" />
3396                         <field name="field" reporter:datatype="link"/>
3397                         <field name="source" reporter:datatype="link"/>
3398                         <field name="value"  reporter:datatype="text"/>
3399                 </fields>
3400                 <links>
3401                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3402                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3403                 </links>
3404         </class>
3405         <class id="mbe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry" oils_persist:tablename="metabib.browse_entry" reporter:label="Combined Browse Entry" oils_persist:readonly="true">
3406                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3407                         <field name="id" reporter:datatype="id" />
3408                         <field name="value" reporter:datatype="text"/>
3409                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3410                 </fields>
3411                 <links>
3412                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3413                 </links>
3414         </class>
3415         <class id="mbedm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_def_map" oils_persist:tablename="metabib.browse_entry_def_map" reporter:label="Combined Browse Entry Definition Map" oils_persist:readonly="true">
3416                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3417                         <field name="id" reporter:datatype="id" />
3418                         <field name="entry" reporter:datatype="link"/>
3419                         <field name="def" reporter:datatype="link"/>
3420                         <field name="source" reporter:datatype="link"/>
3421                 </fields>
3422                 <links>
3423                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3424                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3425                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3426                 </links>
3427         </class>
3428         <class id="mbeshm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_simple_heading_map" oils_persist:tablename="metabib.browse_entry_simple_heading_map" reporter:label="Combined Browse Entry Simple Authority Heading Map" oils_persist:readonly="true">
3429                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3430                         <field name="id" reporter:datatype="id" />
3431                         <field name="entry" reporter:datatype="link"/>
3432                         <field name="simple_heading" reporter:datatype="link"/>
3433                 </fields>
3434                 <links>
3435                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3436                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3437                 </links>
3438         </class>
3439         <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">
3440                 <oils_persist:source_definition>
3441                         SELECT * FROM metabib.author_field_entry
3442                                                 UNION ALL
3443                         SELECT * FROM metabib.keyword_field_entry
3444                                                 UNION ALL
3445                         SELECT * FROM metabib.identifier_field_entry
3446                                                 UNION ALL
3447                         SELECT * FROM metabib.title_field_entry
3448                                                 UNION ALL
3449                         SELECT * FROM metabib.subject_field_entry
3450                                                 UNION ALL
3451                         SELECT * FROM metabib.series_field_entry
3452                 </oils_persist:source_definition>
3453                 <fields>
3454                         <field name="field" reporter:datatype="link"/>
3455                         <field name="id" reporter:datatype="id" />
3456                         <field name="source" reporter:datatype="link"/>
3457                         <field name="value"  reporter:datatype="text"/>
3458                 </fields>
3459                 <links>
3460                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3461                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3462                 </links>
3463         </class>
3464         <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">
3465                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3466                         <field name="field" reporter:datatype="link"/>
3467                         <field name="id" reporter:datatype="id" />
3468                         <field name="source" reporter:datatype="link"/>
3469                         <field name="value"  reporter:datatype="text"/>
3470                 </fields>
3471                 <links>
3472                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3473                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3474                 </links>
3475         </class>
3476         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3477                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3478                         <field name="accepting_usr" reporter:datatype="link"/>
3479                         <field name="amount" reporter:datatype="money" />
3480                         <field name="amount_collected" reporter:datatype="money" />
3481                         <field name="cash_drawer" reporter:datatype="link"/>
3482                         <field name="id" reporter:datatype="id" />
3483                         <field name="note"  reporter:datatype="text"/>
3484                         <field name="payment_ts" reporter:datatype="timestamp"/>
3485                         <field name="xact" reporter:datatype="link"/>
3486                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3487                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3488                 </fields>
3489                 <links>
3490                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3491                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3492                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3493                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3494                 </links>
3495         </class>
3496         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3497                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3498                         <field name="accepting_usr" reporter:datatype="link"/>
3499                         <field name="amount" reporter:datatype="money" />
3500                         <field name="amount_collected" reporter:datatype="money" />
3501                         <field name="id" reporter:datatype="id" />
3502                         <field name="note"  reporter:datatype="text"/>
3503                         <field name="payment_ts" reporter:datatype="timestamp"/>
3504                         <field name="xact" reporter:datatype="link"/>
3505                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3506                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3507                 </fields>
3508                 <links>
3509                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3510                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3511                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3512                 </links>
3513         </class>
3514         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3515                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3516                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3517                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3518                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3519                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3520                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3521                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3522                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3523                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3524                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3525                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3526                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3527                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3528                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3529                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3530                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3531                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3532                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3533                 </fields>
3534                 <links>
3535                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3536                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3537                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3538                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3539                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3540                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3541                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3542                 </links>
3543         </class>
3544
3545         <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">
3546                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3547                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3548                         <field name="name"  reporter:datatype="text"/>
3549                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3550                         <field name="block_list" reporter:datatype="text"/>
3551                         <field name="staff_alert" reporter:datatype="bool"/>
3552                         <field name="org_depth" reporter:datatype="int"/>
3553                 </fields>
3554                 <links/>
3555         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3556             <actions>
3557                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3558                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3559                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3560                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3561             </actions>
3562         </permacrud>
3563         </class>
3564         <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">
3565                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3566                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3567                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3568                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3569                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3570                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3571                 </fields>
3572                 <links>
3573                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3574                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3575                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3576         </links>
3577         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3578             <actions>
3579                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3580                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3581                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3582                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3583             </actions>
3584         </permacrud>
3585         </class>
3586         <class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status" oils_persist:field_safe="true">
3587                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3588                         <field name="holdable" reporter:datatype="bool"/>
3589                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3590                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3591                         <field name="opac_visible" reporter:datatype="bool"/>
3592             <field name="copy_active" reporter:datatype="bool"/>
3593             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3594                 </fields>
3595                 <links/>
3596         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3597             <actions>
3598                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3599                 <retrieve/>
3600                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3601                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3602             </actions>
3603         </permacrud>
3604         </class>
3605         <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">
3606                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3607                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3608                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3609                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3610                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3611                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3612                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3613                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3614                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3615                 </fields>
3616                 <links>
3617                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3618                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3619                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3620                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3621                 </links>
3622                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3623                         <actions>
3624                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3625                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3626                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3627                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3628                         </actions>
3629                 </permacrud>
3630         </class>
3631         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3632                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3633                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3634                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3635                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3636                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3637                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3638                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3639                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3640                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3641                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3642                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3643                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3644                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3645                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3646                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3647                 </fields>
3648                 <links>
3649                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3650                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3651                 </links>
3652         </class>
3653         <class id="aal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::address_alert" oils_persist:tablename="actor.address_alert" reporter:label="Address Alert">
3654                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3655                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3656                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3657                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3658                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3659                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3660                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3661                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3662                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3663                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3664                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3665                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3666                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3667                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3668                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3669                 </fields>
3670                 <links>
3671                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3672                 </links>
3673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3674                         <actions>
3675                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3676                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3677                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3678                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3679                         </actions>
3680                 </permacrud>
3681         </class>
3682
3683
3684         <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">
3685                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3686                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3687                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3688                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3689                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3690                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3691                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3692                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3693                 </fields>
3694                 <links>
3695                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3696                 </links>
3697         </class>
3698
3699         <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">
3700                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3701                         <field name="call_number" />
3702                         <field name="create_date" reporter:datatype="timestamp"/>
3703                         <field name="creator" reporter:datatype="link"/>
3704                         <field name="id" reporter:datatype="id" />
3705                         <field name="pub" reporter:datatype="bool"/>
3706                         <field name="title"  reporter:datatype="text"/>
3707                         <field name="value"  reporter:datatype="text"/>
3708                 </fields>
3709                 <links>
3710                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3711                 </links>
3712         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3713             <actions>
3714                 <create permission="CREATE_VOLUME_NOTE">
3715                     <context link="call_number" field="owning_lib"/>
3716                 </create>
3717                 <retrieve permission="VIEW_VOLUME_NOTES">
3718                     <context link="call_number" field="owning_lib"/>
3719                 </retrieve>
3720                 <update permission="UPDATE_VOLUME_NOTE">
3721                     <context link="call_number" field="owning_lib"/>
3722                 </update>
3723                 <delete permission="DELETE_VOLUME_NOTE">
3724                     <context link="call_number" field="owning_lib"/>
3725                 </delete>
3726             </actions>
3727         </permacrud>
3728         </class>
3729         <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">
3730                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3731                         <field name="create_date" reporter:datatype="timestamp"/>
3732                         <field name="creator" reporter:datatype="link"/>
3733                         <field name="edit_date" reporter:datatype="timestamp"/>
3734                         <field name="editor" reporter:datatype="link"/>
3735                         <field name="id" reporter:datatype="id" />
3736                         <field name="record" reporter:datatype="link"/>
3737                         <field name="value" reporter:datatype="text"/>
3738                 </fields>
3739                 <links>
3740                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3741                 </links>
3742         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3743             <actions>
3744                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3745                 <retrieve/>
3746                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3747                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3748             </actions>
3749         </permacrud>
3750         </class>
3751         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3752         <oils_persist:source_definition>
3753 SELECT  usr,
3754         SUM(
3755             CASE
3756                 WHEN (
3757                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3758                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3759                 ) THEN 1
3760                 ELSE 0
3761             END
3762         ) AS out,
3763
3764         SUM(
3765             CASE
3766                 WHEN (
3767                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3768                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3769                 ) THEN 1
3770                 ELSE 0
3771             END
3772         ) AS overdue,
3773
3774         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3775         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3776         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3777   FROM  action.circulation
3778   WHERE checkin_time IS NULL
3779   GROUP BY 1
3780         </oils_persist:source_definition>
3781         <fields oils_persist:primary="usr">
3782             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3783             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3784             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3785             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3786             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3787             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3788         </fields>
3789         <links>
3790             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3791         </links>
3792         </class>
3793         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3794         <oils_persist:source_definition>
3795 SELECT  usr,
3796         STRING_AGG(
3797             CASE
3798                 WHEN (
3799                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3800                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3801                 ) THEN id::TEXT
3802                 ELSE '0'
3803             END
3804         ,',') AS out,
3805
3806         STRING_AGG(
3807             CASE
3808                 WHEN (
3809                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3810                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3811                 ) THEN id::TEXT
3812                 ELSE '0'
3813             END
3814         ,',') AS overdue,
3815
3816         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
3817         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id::TEXT ELSE '0' END,',') AS claims_returned,
3818         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
3819   FROM  action.circulation
3820   WHERE checkin_time IS NULL
3821   GROUP BY 1
3822         </oils_persist:source_definition>
3823         <fields oils_persist:primary="usr">
3824             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3825             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3826             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3827             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3828             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3829             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3830         </fields>
3831         <links>
3832             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3833         </links>
3834         </class>
3835         <class id="circ" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3836                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3837                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3838                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3839                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3840                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3841                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3842                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3843                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3844                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3845                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3846                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3847                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3848                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3849                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3850                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3851                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3852                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3853                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3854                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3855                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3856                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3857                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3858                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3859                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3860                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3861                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3862                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3863                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3864                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3865                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3866                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3867                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3868                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3869                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3870                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3871                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3872                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3873                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3874                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3875                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3876                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3877                 </fields>
3878                 <links>
3879                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3880                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3881                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3882                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3883                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3884                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3885                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3886                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3887                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3888                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3889                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3890                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3891                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3892                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3893                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3894                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3895                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3896                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3897                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3898                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3899                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3900                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3901                 </links>
3902                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3903                         <actions>
3904                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3905                         </actions>
3906                 </permacrud>
3907         </class>
3908         <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">
3909                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3910                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3911                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3912                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3913                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3914                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3915                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3916                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3917                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3918                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3919                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3920                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3921                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3922                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3923                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3924                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3925                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3926                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3927                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3928                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3929                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3930                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3931                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3932                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3933                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3934                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3935                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3936                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3937                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3938                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3939                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3940                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3941                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3942                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3943                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3944                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3945                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3946                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3947                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3948                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3949                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3950                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3951                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3952                 </fields>
3953                 <links>
3954                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3955                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3956                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3957                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3958                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3959                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3960                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3961                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3962                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3963                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3964                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3965                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3966                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3967                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3968                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3969                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3970                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3971                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3972                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3973                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3974                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3975                 </links>
3976         </class>
3977         <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">
3978                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3979                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3980                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3981                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3982                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3983                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3984                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3985                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3986                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3987                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3988                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3989                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3990                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3991                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3992                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3993                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3994                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3995                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3996                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3997                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3998                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3999                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4000                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4001                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4002                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4003                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
4004                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4005                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4006                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4007                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4008                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4009                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4010                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4011                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4012                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4013                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4014                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4015                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4016                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4017                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4018                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4019                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4020                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4021                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4022                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4023                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4024                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4025                 </fields>
4026                 <links>
4027                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4028                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4029                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4030                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4031                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4032                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4033                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4034                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4035                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4036                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4037                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4038                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4039                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4040                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4041                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4042                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4043                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4044                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4045                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4046                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4047                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4048                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4049                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4050                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4051                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4052                 </links>
4053         </class>
4054
4055         <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">
4056                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4057                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4058                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4059                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4060                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4061                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4062                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4063                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4064                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4065                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4066                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4067                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4068                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4069                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4070                 </fields>
4071                 <links>
4072                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4073                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4074                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4075                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4076                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4077                 </links>
4078                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4079                         <actions>
4080                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4081                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4082                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4083                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4084                         </actions>
4085                 </permacrud>
4086         </class>
4087
4088         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4089                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4090                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4091                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4092                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4093                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4094                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4095                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4096                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4097                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4098                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4099                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4100                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4101                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4102                 </fields>
4103                 <links>
4104                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4105                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4106                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4107                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4108                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4109                 </links>
4110                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4111                         <actions>
4112                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4113                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4114                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4115                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4116                         </actions>
4117                 </permacrud>
4118         </class>
4119         
4120         <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">
4121                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4122                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4123                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4124                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4125                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4126                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4127                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4128                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4129                 </fields>
4130                 <links>
4131                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4132                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4133                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4134                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4135                 </links>
4136                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4137                         <actions>
4138                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4139                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4140                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4141                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4142                         </actions>
4143                 </permacrud>
4144         </class>
4145         
4146         <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">
4147                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4148                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4149                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4150                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4151                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4152                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4153                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4154                 </fields>
4155                 <links>
4156                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4157                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4158                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4159                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4160                 </links>
4161                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4162                         <actions>
4163                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4164                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4165                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4166                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4167                         </actions>
4168                 </permacrud>
4169         </class>
4170         
4171         <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">
4172                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4173                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4174                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4175                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4176                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4177                 </fields>
4178                 <links>
4179                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4180                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4181                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4182                 </links>
4183                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4184                         <actions>
4185                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4186                     <context link="resource" field="owner" />
4187                 </create>
4188                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4189                     <context link="resource" field="owner" />
4190                 </retrieve>
4191                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4192                     <context link="resource" field="owner" />
4193                 </update>
4194                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4195                     <context link="resource" field="owner" />
4196                 </delete>
4197                         </actions>
4198                 </permacrud>
4199         </class>
4200         
4201         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4202                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4203                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4204                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4205                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4206                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4207                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4208                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4209                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4210                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4211                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4212                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4213                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4214                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4215                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4216                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4217                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4218                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4219                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4220                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4221                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4222                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4223                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4224                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4225                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4226                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4227                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4228                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4229                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4230                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4231                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4232                 </fields>
4233                 <links>
4234                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4235                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4236                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4237                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4238                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4239                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4240                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4241                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4242                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4243                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4244                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4245                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4246                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4247                 </links>
4248                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4249                         <actions>
4250                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4251                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4252                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4253                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4254                         </actions>
4255                 </permacrud>
4256         </class>
4257         
4258         <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">
4259                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4260                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4261                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4262                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4263                 </fields>
4264                 <links>
4265                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4266                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4267                 </links>
4268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4269                         <actions>
4270                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4271                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4272                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4273                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4274                         </actions>
4275                 </permacrud>
4276         </class>
4277
4278         <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">
4279                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4280                         <field name="bucket" reporter:datatype="link"/>
4281                         <field name="id" reporter:datatype="id" />
4282                         <field name="target_call_number" reporter:datatype="link" />
4283                         <field name="create_time" reporter:datatype="timestamp" />
4284                         <field name="pos" reporter:datatype="int" />
4285                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4286                 </fields>
4287                 <links>
4288                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4289                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4290             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4291                 </links>
4292         </class>
4293         <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">
4294                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4295                         <field name="id" reporter:datatype="id" />
4296                         <field name="item" reporter:datatype="link"/>
4297                         <field name="note" reporter:datatype="text" />
4298                 </fields>
4299                 <links>
4300                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4301                 </links>
4302         </class>
4303         <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">
4304                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4305                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4306                         <field name="btype" reporter:datatype="text"/>
4307                         <field name="id" reporter:datatype="id" />
4308                         <field name="name" reporter:datatype="text"/>
4309                         <field name="description" reporter:datatype="text"/>
4310                         <field name="owner" reporter:datatype="link"/>
4311                         <field name="pub" reporter:datatype="bool"/>
4312                         <field name="create_time" reporter:datatype="timestamp" />
4313                 </fields>
4314                 <links>
4315                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4316                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4317                 </links>
4318         </class>
4319         <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">
4320                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4321                         <field name="id" reporter:datatype="id" />
4322                         <field name="bucket" reporter:datatype="link"/>
4323                         <field name="note" reporter:datatype="text" />
4324                 </fields>
4325                 <links>
4326                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4327                 </links>
4328         </class>
4329         <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">
4330                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4331                         <field name="hold" reporter:datatype="link"/>
4332                         <field name="id" reporter:datatype="id" />
4333                         <field name="target_copy" reporter:datatype="link"/>
4334                         <field name="proximity" reporter:datatype="number"/>
4335                 </fields>
4336                 <links>
4337                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4338                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4339                 </links>
4340         </class>
4341         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4342                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4343                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4344                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4345                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4346                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4347                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4348                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4349                 </fields>
4350                 <links>
4351                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4352                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4353                 </links>
4354         </class>
4355         <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"  oils_persist:field_safe="true">
4356                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4357                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4358                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4359                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4360                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4361                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4362                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4363                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4364                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4365                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4366                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4367                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4368                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4369                 </fields>
4370                 <links>
4371                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4372                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4373                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4374                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4375                 </links>
4376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4377             <actions>
4378                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4379                 <retrieve/>
4380                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4381                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4382             </actions>
4383         </permacrud>
4384         </class>
4385         <class id="acplg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group" oils_persist:tablename="asset.copy_location_group" reporter:label="Copy/Shelving Location Group">
4386                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4387                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4388                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4389                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4390                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4391             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4392             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4393             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4394                 </fields>
4395                 <links>
4396                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4397                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4398                 </links>
4399         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4400             <actions>
4401                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4402                 <retrieve/>
4403                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4404                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4405             </actions>
4406         </permacrud>
4407         </class>
4408         <class id="acplgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group_map" oils_persist:tablename="asset.copy_location_group_map" reporter:label="Copy/Shelving Location Group Map">
4409                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4410                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4411             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4412             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4413                 </fields>
4414                 <links>
4415                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4416                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4417                 </links>
4418         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4419             <actions>
4420                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4421                                         <context link="lgroup" field="owner" />
4422                 </create>
4423                 <retrieve/>
4424                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4425                                         <context link="lgroup" field="owner" />
4426                 </update>
4427                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4428                                         <context link="lgroup" field="owner" />
4429                 </delete>
4430             </actions>
4431         </permacrud>
4432         </class>
4433
4434     <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">
4435         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4436             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4437             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4438             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4439             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4440         </fields>
4441         <links>
4442             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4443             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4444         </links>
4445         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4446             <actions>
4447                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4448                 <retrieve/>
4449                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4450                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4451             </actions>
4452         </permacrud>
4453     </class>
4454
4455         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4456                 <fields>
4457                         <field name="sre_id" oils_persist:virtual="true" />
4458                         <field name="location" oils_persist:virtual="true" />
4459                         <field name="owning_lib" oils_persist:virtual="true" />
4460                         <field name="basic_holdings" oils_persist:virtual="true" />
4461                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4462                         <field name="supplement_holdings" oils_persist:virtual="true" />
4463                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4464                         <field name="index_holdings" oils_persist:virtual="true" />
4465                         <field name="index_holdings_add" oils_persist:virtual="true" />
4466                         <field name="online" oils_persist:virtual="true" />
4467                         <field name="missing" oils_persist:virtual="true" />
4468                         <field name="incomplete" oils_persist:virtual="true" />
4469                 </fields>
4470         </class>
4471
4472         <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">
4473                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4474                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4475                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4476                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4477                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4478                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4479                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4480                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4481                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4482                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4483                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4484                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4485                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4486                 </fields>
4487                 <links>
4488                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4489                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4490                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4491                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4492                 </links>
4493                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4494                         <actions>
4495                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4496                                 <retrieve/>
4497                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4498                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4499                         </actions>
4500                 </permacrud>
4501         </class>
4502
4503         <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">
4504                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4505                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4506                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4507                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4508                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4509                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4510                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4511                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4512                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4513                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4514                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4515                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4516                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4517                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4518                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4519                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4520                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4521                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4522                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4523                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4524                 </fields>
4525                 <links>
4526                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4527                 </links>
4528                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4529                         <actions>
4530                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4531                                         <context link="subscription" field="owning_lib" />
4532                                 </create>
4533                                 <retrieve />
4534                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4535                                         <context link="subscription" field="owning_lib" />
4536                                 </update>
4537                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4538                                         <context link="subscription" field="owning_lib" />
4539                                 </delete>
4540                         </actions>
4541                 </permacrud>
4542         </class>
4543
4544         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4545                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4546                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4547                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4548                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4549                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4550                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4551                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4552                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4553                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4554                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4555                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4556                 </fields>
4557                 <links>
4558                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4559                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4560                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4561                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4562                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4563                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4564                 </links>
4565                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4566                         <actions>
4567                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4568                                 <retrieve />
4569                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4570                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4571                         </actions>
4572                 </permacrud>
4573         </class>
4574
4575         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4576                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4577                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4578                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4579                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4580                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4581                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4582                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4583                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4584                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4585                 </fields>
4586                 <links>
4587                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4588                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4589                 </links>
4590         </class>
4591
4592         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4593                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4594                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4595                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4596                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4597                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4598                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4599                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4600                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4601                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4602                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4603                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4604                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4605                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4606                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4607                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4608                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4609                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4610                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4611                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4612                 </fields>
4613                 <links>
4614                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4615                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4616                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4617                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4618                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4619                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4620                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4621                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4622                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4623                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4624                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4625                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4626                 </links>
4627                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4628                         <actions>
4629                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4630                                 <retrieve />
4631                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4632                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4633                         </actions>
4634                 </permacrud>
4635         </class>
4636
4637         <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">
4638                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4639                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4640                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4641                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4642                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4643                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4644                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4645                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4646                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4647                 </fields>
4648                 <links>
4649                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4650                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4651                 </links>
4652                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4653                         <actions>
4654                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4655                                         <context link="distribution" field="holding_lib" />
4656                                 </create>
4657                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4658                                         <context link="distribution" field="holding_lib" />
4659                                 </retrieve>
4660                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4661                                         <context link="distribution" field="holding_lib" />
4662                                 </update>
4663                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4664                                         <context link="distribution" field="holding_lib" />
4665                                 </delete>
4666                         </actions>
4667                 </permacrud>
4668         </class>
4669
4670         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4671                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4672                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4673                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4674                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4675                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4676                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4677                 </fields>
4678                 <links>
4679                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4680                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4681                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4682                 </links>
4683                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4684                         <actions>
4685                                 <create permission="ADMIN_SERIAL_STREAM">
4686                                         <context link="distribution" field="holding_lib" />
4687                                 </create>
4688                                 <retrieve />
4689                                 <update permission="ADMIN_SERIAL_STREAM">
4690                                         <context link="distribution" field="holding_lib" />
4691                                 </update>
4692                                 <delete permission="ADMIN_SERIAL_STREAM">
4693                                         <context link="distribution" field="holding_lib" />
4694                                 </delete>
4695                         </actions>
4696                 </permacrud>
4697         </class>
4698
4699         <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">
4700                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4701                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4702                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4703                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4704                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4705                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4706                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4707                 </fields>
4708                 <links>
4709                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4710                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4711                 </links>
4712                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4713                         <actions>
4714                                 <create permission="ADMIN_SERIAL_STREAM">
4715                                         <context link="stream" jump="distribution" field="holding_lib" />
4716                                 </create>
4717                                 <retrieve permission="RECEIVE_SERIAL">
4718                                         <context link="stream" jump="distribution" field="holding_lib" />
4719                                 </retrieve>
4720                                 <update permission="ADMIN_SERIAL_STREAM">
4721                                         <context link="stream" jump="distribution" field="holding_lib" />
4722                                 </update>
4723                                 <delete permission="ADMIN_SERIAL_STREAM">
4724                                         <context link="stream" jump="distribution" field="holding_lib" />
4725                                 </delete>
4726                         </actions>
4727                 </permacrud>
4728         </class>
4729
4730         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4731                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4732                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4733                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4734                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4735                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4736                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4737                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4738                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4739                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4740                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4741                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4742                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4743                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4744                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4745                 </fields>
4746                 <links>
4747                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4748                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4749                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4750                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4751                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4752                 </links>
4753                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4754                         <actions>
4755                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4756                                         <context link="subscription" field="owning_lib" />
4757                                 </create>
4758                                 <retrieve/>
4759                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4760                                         <context link="subscription" field="owning_lib" />
4761                                 </update>
4762                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4763                                         <context link="subscription" field="owning_lib" />
4764                                 </delete>
4765                         </actions>
4766                 </permacrud>
4767         </class>
4768
4769         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4770                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4771                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4772                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4773                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4774                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4775                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4776                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4777                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4778                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4779                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4780                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4781                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4782                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4783                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4784                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4785                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4786                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4787                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4788                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4789                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4790                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4791                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4792                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4793                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4794                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4795                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4796                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4797                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4798                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4799                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4800                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4801                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4802                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
4803                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4804                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4805                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4806                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4807                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4808                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4809                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4810                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4811                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4812                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4813                 </fields>
4814                 <links>
4815                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4816                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4817                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4818                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4819                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4820                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4821                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4822                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4823                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4824                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4825                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4826                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4827                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4828                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4829                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
4830                 </links>
4831                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4832                         <actions>
4833                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4834                                 <retrieve/>
4835                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4836                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4837                         </actions>
4838                 </permacrud>
4839         </class>
4840
4841         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4842                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4843                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4844                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4845                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4846                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4847                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4848                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4849                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4850                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4851                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4852                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4853                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4854                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4855                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4856                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4857                 </fields>
4858                 <links>
4859                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4860                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4861                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4862                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4863                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4864                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4865                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4866                 </links>
4867                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4868                         <actions>
4869                                 <create permission="ADMIN_SERIAL_ITEM">
4870                                         <context link="stream" jump="distribution" field="holding_lib" />
4871                                 </create>
4872                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4873                                         <context link="stream" jump="distribution" field="holding_lib" />
4874                                 </retrieve>
4875                                 <update permission="ADMIN_SERIAL_ITEM">
4876                                         <context link="stream" jump="distribution" field="holding_lib" />
4877                                 </update>
4878                                 <delete permission="ADMIN_SERIAL_ITEM">
4879                                         <context link="stream" jump="distribution" field="holding_lib" />
4880                                 </delete>
4881                         </actions>
4882                 </permacrud>
4883         </class>
4884
4885         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4886                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4887                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4888                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4889                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4890                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4891                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4892                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4893                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4894                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4895                 </fields>
4896                 <links>
4897                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4898                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4899                 </links>
4900                 <!-- Not available via PCRUD at this time -->
4901         </class>
4902         <class id="sasum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::any_summary" oils_persist:tablename="serial.any_summary" reporter:label="All Issues' Summaries" oils_persist:readonly="true">
4903                 <fields>
4904                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4905                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4906                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4907                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4908                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4909                 </fields>
4910                 <links>
4911                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4912                 </links>
4913         </class>
4914         <class id="smhc" controller="open-ils.cstore" oils_obj:fieldmapper="serial::materialized_holding_code" oils_persist:tablename="serial.materialized_holding_code" reporter:label="Materialized Holding Code" oils_persist:readonly="true">
4915                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4916                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4917                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4918                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4919                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4920                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4921                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4922                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4923                 </fields>
4924                 <links>
4925                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4926                 </links>
4927         </class>
4928         <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">
4929                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4930                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4931                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4932                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4933                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4934                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4935                 </fields>
4936                 <links>
4937                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4938                 </links>
4939                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4940                         <actions>
4941                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4942                                         <context link="distribution" field="holding_lib" />
4943                                 </create>
4944                                 <retrieve/>
4945                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4946                                         <context link="distribution" field="holding_lib" />
4947                                 </update>
4948                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4949                                         <context link="distribution" field="holding_lib" />
4950                                 </delete>
4951                         </actions>
4952                 </permacrud>
4953         </class>
4954
4955         <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">
4956                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4957                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4958                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4959                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4960                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4961                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4962                 </fields>
4963                 <links>
4964                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4965                 </links>
4966                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4967                         <actions>
4968                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4969                                         <context link="distribution" field="holding_lib" />
4970                                 </create>
4971                                 <retrieve/>
4972                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4973                                         <context link="distribution" field="holding_lib" />
4974                                 </update>
4975                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4976                                         <context link="distribution" field="holding_lib" />
4977                                 </delete>
4978                         </actions>
4979                 </permacrud>
4980         </class>
4981
4982         <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">
4983                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4984                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4985                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4986                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4987                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4988                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4989                 </fields>
4990                 <links>
4991                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4992                 </links>
4993                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4994                         <actions>
4995                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4996                                         <context link="distribution" field="holding_lib" />
4997                                 </create>
4998                                 <retrieve/>
4999                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5000                                         <context link="distribution" field="holding_lib" />
5001                                 </update>
5002                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5003                                         <context link="distribution" field="holding_lib" />
5004                                 </delete>
5005                         </actions>
5006                 </permacrud>
5007         </class>
5008
5009         <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">
5010                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5011                         <field name="id" reporter:datatype="id" />
5012                         <field name="owning_copy" reporter:datatype="link"/>
5013                         <field name="stat_cat" reporter:datatype="link"/>
5014                         <field name="stat_cat_entry" reporter:datatype="link"/>
5015                 </fields>
5016                 <links>
5017                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5018                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5019                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5020                 </links>
5021         </class>
5022         <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">
5023                 <fields oils_persist:primary="code">
5024                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5025                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5026                 </fields>
5027                 <links/>
5028         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5029             <actions>
5030                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5031                 <retrieve/>
5032                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5033                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5034             </actions>
5035         </permacrud>
5036         </class>
5037         <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">
5038                 <fields oils_persist:primary="code">
5039                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5040                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5041                 </fields>
5042                 <links/>
5043         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5044             <actions>
5045                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5046                 <retrieve/>
5047                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5048                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5049             </actions>
5050         </permacrud>
5051         </class>
5052         <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">
5053                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5054                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5055                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5056                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5057                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5058                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5059                 </fields>
5060                 <links>
5061             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5062         </links>
5063         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5064             <actions>
5065                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5066                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5067                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5068                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5069             </actions>
5070         </permacrud>
5071         </class>
5072         <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">
5073                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5074                         <field name="id" reporter:datatype="id" />
5075                         <field name="name" reporter:datatype="text"/>
5076                 </fields>
5077                 <links/>
5078         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5079             <actions>
5080                 <create permission="CREATE_LASSO" global_required="true"/>
5081                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5082                 <update permission="UPDATE_LASSO" global_required="true"/>
5083                 <delete permission="DELETE_LASSO" global_required="true"/>
5084             </actions>
5085         </permacrud>
5086         </class>
5087         <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">
5088                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5089                         <field name="id" reporter:datatype="id" />
5090                         <field name="lasso" reporter:datatype="link"/>
5091                         <field name="org_unit" reporter:datatype="org_unit"/>
5092                 </fields>
5093                 <links>
5094                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5095                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5096                 </links>
5097         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5098             <actions>
5099                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5100                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5101                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5102                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5103             </actions>
5104         </permacrud>
5105         </class>
5106         <class id="aoupa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_proximity_adjustment" oils_persist:tablename="actor.org_unit_proximity_adjustment" reporter:label="Org Unit Proximity Adjustment">
5107                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5108                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5109                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5110                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5111                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5112                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5113                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5114                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5115                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5116                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5117                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5118                 </fields>
5119                 <links>
5120                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5121                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5122                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5123                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5124                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5125                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5126                 </links>
5127         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5128             <actions>
5129                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5130                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5131                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5132                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5133             </actions>
5134         </permacrud>
5135         </class>
5136         <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">
5137                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5138                         <field name="id" reporter:datatype="id" />
5139                         <field name="from_org" reporter:datatype="org_unit"/>
5140                         <field name="to_org" reporter:datatype="org_unit"/>
5141                         <field name="prox" reporter:datatype="int" />
5142                 </fields>
5143                 <links>
5144                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5145                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5146                 </links>
5147         </class>
5148         <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">
5149                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5150                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5151                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5152                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5153                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5154                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5155                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5156                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5157                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5158                 </fields>
5159                 <links/>
5160         </class>
5161         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5162                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5163                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5164                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5165                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5166                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5167                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5168                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5169                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5170                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5171                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5172                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5173                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5174                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5175                 </fields>
5176                 <links>
5177                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5178                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5179                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5180                 </links>
5181         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5182             <actions>
5183                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5184                 <retrieve/>
5185                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5186                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5187             </actions>
5188         </permacrud>
5189         </class>
5190         <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">
5191                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5192                         <field name="address_type"  reporter:datatype="text"/>
5193                         <field name="city"  reporter:datatype="text"/>
5194                         <field name="country"  reporter:datatype="text"/>
5195                         <field name="county"  reporter:datatype="text"/>
5196                         <field name="id" reporter:datatype="id" />
5197                         <field name="org_unit" reporter:datatype="org_unit"/>
5198                         <field name="post_code"  reporter:datatype="text"/>
5199                         <field name="state"  reporter:datatype="text"/>
5200                         <field name="street1"  reporter:datatype="text"/>
5201                         <field name="street2"  reporter:datatype="text"/>
5202                         <field name="valid" reporter:datatype="bool"/>
5203                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5204                 </fields>
5205                 <links>
5206                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5207                 </links>
5208         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5209             <actions>
5210                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5211                 <retrieve/>
5212                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5213                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5214             </actions>
5215         </permacrud>
5216         </class>
5217         <class id="asq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_query" oils_persist:tablename="actor.search_query" reporter:label="Search Query" oils_persist:field_safe="true">
5218                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5219                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5220                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5221                         <field name="query_text" reporter:datatype="text"/>
5222                 </fields>
5223         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5224             <actions>
5225                 <retrieve/>
5226             </actions>
5227         </permacrud>
5228         </class>
5229
5230         <class id="asfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group" oils_persist:tablename="actor.search_filter_group" reporter:label="Search Filter Group" oils_persist:field_safe="true">
5231                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5232                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5233                         <field name="owner" reporter:datatype="org_unit"/>
5234                         <field name="code" reporter:datatype="text"/>
5235                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5236                         <field name="create_date" reporter:datatype="timestamp"/>
5237                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5238                 </fields>
5239                 <links>
5240                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5241                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5242                 </links>
5243         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5244             <actions>
5245                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5246                 <retrieve/>
5247                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5248                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5249             </actions>
5250         </permacrud>
5251         </class>
5252         <class id="asfge" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group_entry" oils_persist:tablename="actor.search_filter_group_entry" reporter:label="Search Filter Group Entry" oils_persist:field_safe="true">
5253                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5254                         <field name="id" reporter:datatype="id"/>
5255                         <field name="grp" reporter:datatype="link"/>
5256                         <field name="pos" reporter:datatype="int"/>
5257                         <field name="query" reporter:datatype="link"/>
5258                 </fields>
5259                 <links>
5260                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5261                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5262                 </links>
5263         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5264             <actions>
5265                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5266                     <context link="grp" field="owner"/>
5267                 </create>
5268                 <retrieve/>
5269                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5270                     <context link="grp" field="owner"/>
5271                 </update>
5272                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5273                     <context link="grp" field="owner"/>
5274                 </delete>
5275             </actions>
5276         </permacrud>
5277         </class>
5278
5279         <!-- A note: Please update alhr and ahopl when updating ahr -->
5280         <class id="ahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_request" oils_persist:tablename="action.hold_request" reporter:core="true" reporter:label="Hold Request">
5281                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5282                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5283                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5284                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5285                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5286                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5287                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5288                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5289                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5290                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5291                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5292                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5293                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5294                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5295                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5296                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5297                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5298                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5299                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5300                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5301                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5302                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5303                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5304                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5305                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5306                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5307                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5308                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5309                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5310                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5311                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5312                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5313                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5314                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5315                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5316                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5317                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5318                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5319                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5320                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5321                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5322                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5323                 </fields>
5324                 <links>
5325                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5326                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5327                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5328                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5329                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5330                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5331                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5332                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5333                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5334                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5335                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5336                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5337                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5338                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5339                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5340                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5341                 </links>
5342                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5343                         <actions>
5344                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5345                         </actions>
5346                 </permacrud>
5347         </class>
5348         <class id="ahopl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_on_pull_list" reporter:label="Hold On Pull List" oils_persist:readonly="true">
5349                 <oils_persist:source_definition><![CDATA[
5350                 SELECT
5351                         ahr.*,
5352                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5353                                 copy_location_order_position,
5354                         CASE WHEN au.alias IS NOT NULL THEN
5355                                 au.alias
5356                         ELSE
5357                                 au.first_given_name
5358                         END AS usr_alias_or_first_given_name,
5359                         au.first_given_name AS usr_first_given_name,
5360                         au.second_given_name AS usr_second_given_name,
5361                         au.family_name AS usr_family_name,
5362                         au.prefix AS usr_prefix,
5363                         au.suffix AS usr_suffix,
5364                         au.alias AS usr_alias,
5365                         CASE WHEN au.alias IS NOT NULL THEN
5366                                 au.alias
5367                         ELSE
5368                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5369                                         COALESCE(au.family_name, ''),
5370                                         COALESCE(au.suffix, ''),
5371                                         ', ',
5372                                         COALESCE(au.prefix, ''),
5373                                         COALESCE(au.first_given_name, ''),
5374                                         COALESCE(au.second_given_name, '')
5375                                 ], ' '), E'\\s+,', ',')
5376                         END AS usr_alias_or_display_name,
5377                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5378                                 COALESCE(au.family_name, ''),
5379                                 COALESCE(au.suffix, ''),
5380                                 ', ',
5381                                 COALESCE(au.prefix, ''),
5382                                 COALESCE(au.first_given_name, ''),
5383                                 COALESCE(au.second_given_name, '')
5384                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5385                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5386                                 AS call_number_label,
5387                         siss.label AS issuance_label,
5388                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5389                         ahcm_1.copy_count AS potential_copies
5390                 FROM action.hold_request ahr
5391                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5392                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5393                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5394                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5395                 JOIN actor.usr au ON (au.id = ahr.usr)
5396                 JOIN (
5397                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5398                         FROM asset.copy_location
5399                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5400                 LEFT JOIN actor.usr_standing_penalty ausp 
5401                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5402                 LEFT JOIN config.standing_penalty csp
5403                         ON (
5404                                 csp.id = ausp.standing_penalty AND 
5405                                 csp.block_list LIKE '%CAPTURE%' AND (
5406                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5407                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5408                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5409                                         )
5410                                 )
5411                         )
5412                 JOIN (
5413                         SELECT COUNT(target_copy) AS copy_count, hold
5414                         FROM action.hold_copy_map
5415                         GROUP BY 2
5416                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5417                 LEFT JOIN serial.issuance siss
5418                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5419                 LEFT JOIN asset.copy_location_order acplo
5420                         ON (acp.location = acplo.location AND
5421                                 acp.circ_lib = acplo.org)
5422                 WHERE
5423                         ahr.capture_time IS NULL AND
5424                         ahr.cancel_time IS NULL AND
5425                         csp.id IS NULL AND
5426                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5427                 ]]></oils_persist:source_definition>
5428                 <fields oils_persist:primary="id">
5429                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5430                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5431                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5432                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5433                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5434                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5435                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5436                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5437                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5438                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5439                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5440                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5441                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5442                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5443                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5444                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5445                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5446                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5447                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5448                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5449                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5450                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5451                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5452                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5453                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5454                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5455                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5456                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5457                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5458                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5459                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5460                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5461                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5462                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5463                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5464                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5465                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5466                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5467                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5468                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5469                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5470                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5471                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5472                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5473                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5474                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5475                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5476                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5477                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5478                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5479                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5480                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5481                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5482                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5483                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5484                 </fields>
5485                 <links>
5486                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5487                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5488                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5489                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5490                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5491                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5492                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5493                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5494                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5495                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5496                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5497                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5498                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5499                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5500                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5501                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5502                 </links>
5503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5504                         <actions>
5505                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5506                         </actions>
5507                 </permacrud>
5508         </class>
5509         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5510                 <oils_persist:source_definition>
5511                         SELECT ahr.* FROM action.hold_request ahr JOIN (SELECT current_copy, MAX(capture_time) AS capture_time FROM action.hold_request WHERE capture_time IS NOT NULL GROUP BY current_copy)x USING (current_copy, capture_time)
5512                 </oils_persist:source_definition>
5513                 <fields oils_persist:primary="id">
5514                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5515                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5516                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5517                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5518                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5519                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5520                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5521                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5522                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5523                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5524                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5525                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5526                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5527                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5528                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5529                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5530                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5531                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5532                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5533                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5534                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5535                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5536                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5537                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5538                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5539                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5540                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5541                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5542                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5543                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5544                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5545                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5546                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5547                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5548                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5549                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5550                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5551                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5552                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5553                 </fields>
5554                 <links>
5555                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5556                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5557                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5558                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5559                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5560                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5561                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5562                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5563                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5564                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5565                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5566                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5567                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5568                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5569                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5570                 </links>
5571         </class>
5572
5573         <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">
5574                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5575                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5576                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5577                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5578                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5579                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5580                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5581                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5582                 </fields>
5583                 <links>
5584                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5585                 </links>
5586                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5587                         <actions>
5588                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5589                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5590                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5591                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5592                         </actions>
5593                 </permacrud>
5594         </class>
5595         <class id="combahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_hold_request" oils_persist:tablename="action.all_hold_request" reporter:core="true" reporter:label="Combined (Active &amp; Aged) Hold Request">
5596                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5597                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5598                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5599                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5600                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5601                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5602                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5603                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5604                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5605                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5606                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5607                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5608                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5609                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5610                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5611                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5612                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5613                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5614                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5615                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5616                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5617                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5618                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5619                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5620                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5621                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5622                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5623                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5624                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5625                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5626                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5627                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5628                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5629                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5630                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5631                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5632                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5633                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5634                 </fields>
5635                 <links>
5636                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5637                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5638                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5639                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5640                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5641                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5642                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5643                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5644                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5645                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5646                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5647                 </links>
5648                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5649                         <actions>
5650                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5651                         </actions>
5652                 </permacrud>
5653         </class>
5654         <class id="aahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::aged_hold_request" oils_persist:tablename="action.aged_hold_request" reporter:core="true" reporter:label="Aged Hold Request">
5655                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5656                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5657                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5658                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5659                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5660                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5661                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5662                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5663                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5664                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5665                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5666                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5667                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5668                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5669                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5670                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5671                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5672                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5673                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5674                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5675                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5676                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5677                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5678                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5679                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5680                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5681                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5682                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5683                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5684                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5685                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5686                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5687                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5688                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5689                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5690                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5691                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5692                 </fields>
5693                 <links>
5694                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5695                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5696                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5697                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5698                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5699                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5700                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5701                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5702                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5703                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5704                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5705                 </links>
5706                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5707                         <actions>
5708                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5709                         </actions>
5710                 </permacrud>
5711         </class>
5712
5713         <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">
5714                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5715                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5716                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5717                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5718                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5719                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5720                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5721                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5722                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5723                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5724                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5725                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5726                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5727                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5728                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5729                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5730                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5731                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5732                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5733                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5734                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5735                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5736                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5737                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5738                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5739                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5740                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5741                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5742                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5743                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5744                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5745                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5746                 </fields>
5747                 <links>
5748                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5749                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5750                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5751                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5752                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5753                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5754                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5755                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5756                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5757                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5758                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5759                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5760                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5761                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5762                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5763                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5764                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5765                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5766                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5767                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5768                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5769                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5770                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5771                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5772                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5773                 </links>
5774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5775             <actions>
5776                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5777                 <retrieve />
5778                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5779                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5780             </actions>
5781         </permacrud>
5782         </class>
5783         <class id="aouct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_custom_tree" oils_persist:tablename="actor.org_unit_custom_tree" reporter:label="Org Unit Custom Tree">
5784                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5785                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5786                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5787                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5788                 </fields>
5789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5790                         <actions>
5791                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5792                                 <retrieve/>
5793                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5794                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5795                         </actions>
5796                 </permacrud>
5797         </class>
5798         <class id="aouctn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_custom_tree_node" oils_persist:tablename="actor.org_unit_custom_tree_node" reporter:label="Org Unit Custom Tree Node">
5799                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5800                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5801                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5802                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5803                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5804                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5805                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5806                 </fields>
5807                 <links>
5808                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5809                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5810                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5811                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5812                 </links>
5813                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5814                         <actions>
5815                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5816                                 <retrieve/>
5817                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5818                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5819                         </actions>
5820                 </permacrud>
5821         </class>
5822         <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">
5823                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5824                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5825                         <field name="btype" reporter:datatype="text"/>
5826                         <field name="id" reporter:datatype="id" />
5827                         <field name="name"  reporter:datatype="text"/>
5828                         <field name="description" reporter:datatype="text"/>
5829                         <field name="owner" reporter:datatype="link"/>
5830                         <field name="pub" reporter:datatype="bool"/>
5831                         <field name="create_time" reporter:datatype="timestamp" />
5832                 </fields>
5833                 <links>
5834                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5835                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5836                 </links>
5837         </class>
5838         <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">
5839                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5840                         <field name="id" reporter:datatype="id" />
5841                         <field name="bucket" reporter:datatype="link"/>
5842                         <field name="note" reporter:datatype="text" />
5843                 </fields>
5844                 <links>
5845                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5846                 </links>
5847         </class>
5848         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5849                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5850                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5851                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5852                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5853                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5854                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5855                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5856                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5857                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5858                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5859                 </fields>
5860                 <links>
5861                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5862                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5863                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5864                 </links>
5865         </class>
5866         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5867                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5868                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5869                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5870                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5871                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5872                 </fields>
5873                 <links>
5874                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5875                 </links>
5876                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5877                         <actions>
5878                                 <retrieve permission="VIEW_USER">
5879                                         <context link="usr" field="home_ou" />
5880                                 </retrieve>
5881                         </actions>
5882                 </permacrud>
5883         </class>
5884     <class id="actscsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::stat_cat_sip_fields" oils_persist:tablename="actor.stat_cat_sip_fields" reporter:label="SIP Statistical Category Field Identifier">
5885         <fields oils_persist:primary="field">
5886             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5887             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5888             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5889         </fields>
5890         <links/>
5891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5892             <actions>
5893                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5894                 <retrieve />
5895                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5896                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5897             </actions>
5898         </permacrud>
5899     </class>
5900         <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">
5901                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5902                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5903                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5904                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5905                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5906                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5907                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5908                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5909                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5910                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5911                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5912                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5913                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5914                 </fields>
5915                 <links>
5916                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5917                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5918                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5919                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5920                 </links>
5921         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5922             <actions>
5923                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5924                 <retrieve />
5925                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5926                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5927             </actions>
5928         </permacrud>
5929         </class>
5930         <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">
5931                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5932                         <field name="field" reporter:datatype="link"/>
5933                         <field name="id" reporter:datatype="id" />
5934                         <field name="source" reporter:datatype="link"/>
5935                         <field name="value"  reporter:datatype="text"/>
5936                 </fields>
5937                 <links>
5938                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5939                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5940                 </links>
5941         </class>
5942         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5943                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5944                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5945                         <field name="btype" reporter:datatype="text"/>
5946                         <field name="id" reporter:datatype="id" />
5947                         <field name="name"  reporter:datatype="text"/>
5948                         <field name="description" reporter:datatype="text"/>
5949                         <field name="owner" reporter:datatype="link"/>
5950                         <field name="pub" reporter:datatype="bool"/>
5951                         <field name="create_time" reporter:datatype="timestamp" />
5952                 </fields>
5953                 <links>
5954                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5955                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5956                 </links>
5957         </class>
5958         <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">
5959                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5960                         <field name="id" reporter:datatype="id" />
5961                         <field name="bucket" reporter:datatype="link"/>
5962                         <field name="note" reporter:datatype="text" />
5963                 </fields>
5964                 <links>
5965                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5966                 </links>
5967         </class>
5968         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5969                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5970                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5971                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5972                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5973                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5974                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5975                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5976                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5977                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5978                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5979                 </fields>
5980                 <links>
5981                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5982                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5983                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5984                 </links>
5985         </class>
5986         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5987                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5988                         <field name="id" reporter:datatype="id" />
5989                         <field name="ind1" />
5990                         <field name="ind2" />
5991                         <field name="record" />
5992                         <field name="subfield" />
5993                         <field name="tag" />
5994                         <field name="value" />
5995                 </fields>
5996                 <links>
5997                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5998                 </links>
5999         </class>
6000         <class id="aalink" controller="open-ils.cstore" oils_obj:fieldmapper="authority::authority_linking" oils_persist:tablename="authority.authority_linking" reporter:label="Authority to Authority Linking">
6001                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6002                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6003                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6004                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6005                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6006                 </fields>
6007                 <links>
6008                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6009                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6010                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6011                 </links>
6012         </class>
6013         <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">
6014                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6015                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6016                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6017                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6018                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6019                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6020                 </fields>
6021                 <links>
6022                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6023                 </links>
6024         </class>
6025         <class id="aout" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_type" oils_persist:tablename="actor.org_unit_type" reporter:label="Organizational Unit Type" oils_persist:field_safe="true">
6026                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6027                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6028                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6029                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6030                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6031                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6032                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6033                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6034                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6035                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6036                 </fields>
6037                 <links>
6038                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6039                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6040                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6041                 </links>
6042         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6043             <actions>
6044                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6045                 <retrieve/>
6046                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6047                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6048             </actions>
6049         </permacrud>
6050         </class>
6051         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6052                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6053                         <field name="create_date" reporter:datatype="timestamp"/>
6054                         <field name="creator" reporter:datatype="link"/>
6055                         <field name="edit_date" reporter:datatype="timestamp"/>
6056                         <field name="editor" reporter:datatype="link"/>
6057                         <field name="id" reporter:datatype="id" />
6058                         <field name="pub" reporter:datatype="bool"/>
6059                         <field name="record" reporter:datatype="link"/>
6060                         <field name="value"  reporter:datatype="text"/>
6061                 </fields>
6062                 <links>
6063                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6064                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6065                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6066                 </links>
6067         </class>
6068         <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">
6069                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6070                         <field name="balance_owed" reporter:datatype="money" />
6071                         <field name="total_owed" reporter:datatype="money" />
6072                         <field name="total_paid" reporter:datatype="money" />
6073                         <field name="usr" reporter:datatype="link"/>
6074                 </fields>
6075                 <links>
6076                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6077                 </links>
6078         </class>
6079         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6080                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6081                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6082                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6083                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6084                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6085                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6086                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6087                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6088                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6089                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6090                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6091                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6092                 </fields>
6093                 <links>
6094                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6095                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6096                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6097                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6098                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6099                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6100                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6101                 </links>
6102         </class>
6103         <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">
6104                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6105                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6106                         <field name="quality" reporter:datatype="int" />
6107                         <field name="source" reporter:datatype="text"/>
6108                         <field name="transcendant" reporter:datatype="bool"/>
6109                         <field name="can_have_copies" reporter:datatype="bool"/>
6110                 </fields>
6111                 <links/>
6112         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6113             <actions>
6114                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6115                 <retrieve/>
6116                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6117                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6118             </actions>
6119         </permacrud>
6120         </class>
6121         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
6122                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6123                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6124                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6125                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6126                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6127                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6128                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6129                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6130                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6131                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6132                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6133                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6134                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6135                 </fields>
6136                 <links>
6137                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6138                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6139                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6140                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6141                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6142                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6143                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6144                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6145                 </links>
6146         </class>
6147         <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">
6148                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6149                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6150                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6151                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6152                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6153                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6154                 </fields>
6155                 <links>
6156                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6157                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6158                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6159                 </links>
6160         </class>
6161         <class id="actsced" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry_default" oils_persist:tablename="actor.stat_cat_entry_default" reporter:label="User Stat Cat Default Entry">
6162                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6163                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6164                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6165                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6166                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6167                 </fields>
6168                 <links>
6169                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6170                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6171                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6172                 </links>
6173         </class>
6174         <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">
6175                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6176                         <field name="bucket" reporter:datatype="link"/>
6177                         <field name="id" reporter:datatype="id" />
6178                         <field name="target_user" reporter:datatype="link"/>
6179                         <field name="create_time" reporter:datatype="timestamp" />
6180                         <field name="pos" reporter:datatype="int" />
6181                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6182                 </fields>
6183                 <links>
6184                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6185                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6186             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6187                 </links>
6188         </class>
6189         <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">
6190                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6191                         <field name="id" reporter:datatype="id" />
6192                         <field name="item" reporter:datatype="link"/>
6193                         <field name="note" reporter:datatype="text" />
6194                 </fields>
6195                 <links>
6196                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6197                 </links>
6198         </class>
6199         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6200                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6201                         <field name="balance_owed" reporter:datatype="money" />
6202                         <field name="total_owed" reporter:datatype="money" />
6203                         <field name="total_paid" reporter:datatype="money" />
6204                         <field name="usr" reporter:datatype="link"/>
6205                 </fields>
6206                 <links>
6207                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6208                 </links>
6209         </class>
6210         <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">
6211                 <fields oils_persist:primary="code" oils_persist:sequence="">
6212                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6213                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6214                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6215                 </fields>
6216                 <links/>
6217         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6218             <actions>
6219                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6220                 <retrieve/>
6221                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6222                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6223             </actions>
6224         </permacrud>
6225         </class>
6226         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
6227                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6228                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6229                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6230                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6231                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6232                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6233                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6234                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6235                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6236                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6237                 </fields>
6238                 <links>
6239                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6240                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6241                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6242                 </links>
6243         </class>
6244         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
6245                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6246                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6247                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6248                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6249                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6250                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6251                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6252                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6253                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6254                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6255                 </fields>
6256                 <links>
6257                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6258                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6259                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6260                 </links>
6261         </class>
6262         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6263                 <fields oils_persist:primary="id" oils_persist:sequence="">
6264                         <field name="checkin_lib" reporter:datatype="link"/>
6265                         <field name="checkin_staff" reporter:datatype="link"/>
6266                         <field name="checkin_time" reporter:datatype="timestamp"/>
6267                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6268                         <field name="circ_staff" reporter:datatype="link"/>
6269                         <field name="desk_renewal" reporter:datatype="bool"/>
6270                         <field name="due_date" reporter:datatype="timestamp"/>
6271                         <field name="duration" reporter:datatype="interval"/>
6272                         <field name="duration_rule" reporter:datatype="link"/>
6273                         <field name="fine_interval" reporter:datatype="interval"/>
6274                         <field name="id" reporter:datatype="id" />
6275                         <field name="max_fine" reporter:datatype="money" />
6276                         <field name="max_fine_rule" reporter:datatype="link"/>
6277                         <field name="opac_renewal" reporter:datatype="bool"/>
6278                         <field name="phone_renewal" reporter:datatype="bool"/>
6279                         <field name="recurring_fine" reporter:datatype="money" />
6280                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6281                         <field name="renewal_remaining" reporter:datatype="int" />
6282             <field name="grace_period" reporter:datatype="interval" />
6283                         <field name="stop_fines" reporter:datatype="text"/>
6284                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6285                         <field name="target_copy" reporter:datatype="link"/>
6286                         <field name="usr" reporter:datatype="link"/>
6287                         <field name="xact_finish" reporter:datatype="timestamp" />
6288                         <field name="xact_start" reporter:datatype="timestamp" />
6289                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6290                 </fields>
6291                 <links>
6292                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6293                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6294                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6295                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6296                 </links>
6297         </class>
6298         <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">
6299                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6300                         <field name="field" reporter:datatype="link"/>
6301                         <field name="id" reporter:datatype="id" />
6302                         <field name="source" reporter:datatype="link"/>
6303                         <field name="value" reporter:datatype="text"/>
6304                 </fields>
6305                 <links>
6306                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6307                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6308                 </links>
6309         </class>
6310         <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">
6311                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6312                         <field name="high" reporter:datatype="money" />
6313                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6314                         <field name="low" reporter:datatype="money" />
6315                         <field name="name" reporter:datatype="text"/>
6316                         <field name="normal" reporter:datatype="money" />
6317                         <field name="recurrence_interval" reporter:datatype="interval"/>
6318             <field name="grace_period" reporter:datatype="interval" />
6319                 </fields>
6320                 <links/>
6321         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6322             <actions>
6323                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6324                 <retrieve/>
6325                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6326                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6327             </actions>
6328         </permacrud>
6329         </class>
6330         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
6331                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6332                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6333                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6334                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6335                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6336                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6337                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6338                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6339                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6340                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6341                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6342                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6343                 </fields>
6344                 <links>
6345                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6346                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6347                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6348                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6349                 </links>
6350         </class>
6351         <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">
6352                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6353                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6354                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6355                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6356                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6357                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6358                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6359                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6360                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6361                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6362                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6363                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6364                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6365                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6366                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6367                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6368                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6369                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6370                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6371                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6372                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6373                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6374                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6375                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6376                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6377                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6378                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6379                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6380                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6381                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6382                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6383                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6384                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6385                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6386                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6387                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6388                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6389                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6390                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6391                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6392                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6393                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6394                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6395                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6396                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6397                 </fields>
6398                 <links>
6399                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6400                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6401                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6402                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6403                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6404                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6405                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6406                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6407                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6408                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6409                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6410                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6411                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6412                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6413                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6414                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6415                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6416                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6417                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6418                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6419                 </links>
6420         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6421             <actions>
6422                 <create permission="CREATE_COPY">
6423                     <context link="call_number" field="owning_lib"/>
6424                 </create>
6425                 <retrieve/>
6426                 <update permission="UPDATE_COPY">
6427                     <context link="call_number" field="owning_lib"/>
6428                 </update>
6429                 <delete permission="DELETE_COPY">
6430                     <context link="call_number" field="owning_lib"/>
6431                 </delete>
6432             </actions>
6433         </permacrud>
6434         </class>
6435
6436         <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">
6437                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6438                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6439                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6440                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6441                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6442                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6443                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6444                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6445                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6446                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6447                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6448                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6449                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6450                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6451                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6452                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6453                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6454                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6455                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6456                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6457                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6458                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6459                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6460                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6461                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6462                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6463                 </fields>
6464                 <links>
6465                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6466                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6467                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6468                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6469                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6470                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6471                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6472                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6473                 </links>
6474                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6475                         <actions>
6476                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6477                                 <retrieve />
6478                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6479                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6480                         </actions>
6481                 </permacrud>
6482         </class>
6483
6484         <class id="crahp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::age_hold_protect" oils_persist:tablename="config.rule_age_hold_protect" reporter:label="Age Hold Protection Rule" oils_persist:field_safe="true">
6485                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6486                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6487                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6488                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6489                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6490                 </fields>
6491                 <links/>
6492         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6493             <actions>
6494                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6495                 <retrieve/>
6496                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6497                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6498             </actions>
6499         </permacrud>
6500         </class>
6501         <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">
6502                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6503                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6504                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6505                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6506                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6507                 </fields>
6508                 <links/>
6509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6510             <actions>
6511                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6512                 <retrieve/>
6513                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6514                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6515             </actions>
6516         </permacrud>
6517         </class>
6518         <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">
6519                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6520                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6521                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6522                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6523                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6524                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6525                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6526                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6527                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6528                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6529                 </fields>
6530                 <links>
6531                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6532                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6533                 </links>
6534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6535             <actions>
6536                 <create permission="CREATE_PERM" global_required="true"/>
6537                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6538                 <update permission="UPDATE_PERM" global_required="true"/>
6539                 <delete permission="DELETE_PERM" global_required="true"/>
6540             </actions>
6541         </permacrud>
6542         </class>
6543         <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">
6544                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6545                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6546                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6547                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6548                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6549                 </fields>
6550                 <links>
6551                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6552                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6553                 </links>
6554         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6555             <actions>
6556                 <create permission="ADMIN_SURVEY">
6557                     <context link="question" jump="survey" field="owner"/>
6558                 </create>
6559                 <retrieve/>
6560                 <update permission="ADMIN_SURVEY">
6561                     <context link="question" jump="survey" field="owner"/>
6562                 </update>
6563                 <delete permission="ADMIN_SURVEY">
6564                     <context link="question" jump="survey" field="owner"/>
6565                 </delete>
6566             </actions>
6567         </permacrud>
6568         </class>
6569         <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">
6570                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6571                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6572                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6573                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6574                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6575                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6576                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6577                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6578                 </fields>
6579                 <links>
6580                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6581                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6582                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6583                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6584                 </links>
6585         </class>
6586         <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">
6587                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6588                         <field name="balance_owed" reporter:datatype="money" />
6589                         <field name="total_owed" reporter:datatype="money" />
6590                         <field name="total_paid" reporter:datatype="money" />
6591                         <field name="usr" reporter:datatype="link"/>
6592                 </fields>
6593                 <links>
6594                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6595                 </links>
6596         </class>
6597         <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">
6598                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6599                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6600                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6601                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6602                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6603                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6604                 </fields>
6605                 <links>
6606                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6607                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6608                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6609                 </links>
6610         </class>
6611         <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">
6612                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6613                         <field name="field" reporter:datatype="link"/>
6614                         <field name="id" reporter:datatype="id" />
6615                         <field name="source" reporter:datatype="link"/>
6616                         <field name="value" reporter:datatype="text"/>
6617                 </fields>
6618                 <links>
6619                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6620                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6621                 </links>
6622         </class>
6623         <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">
6624                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6625                         <field name="field" reporter:datatype="link"/>
6626                         <field name="id" reporter:datatype="id" />
6627                         <field name="source" reporter:datatype="link"/>
6628                         <field name="value" reporter:datatype="text"/>
6629                 </fields>
6630                 <links>
6631                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6632                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6633                 </links>
6634         </class>
6635         <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">
6636                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6637                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6638                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6639                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6640                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6641                 </fields>
6642                 <links>
6643                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6644                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6645                 </links>
6646         </class>
6647         <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">
6648                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6649                         <field name="depth" reporter:datatype="int" />
6650                         <field name="grantable" reporter:datatype="bool"/>
6651                         <field name="grp" reporter:datatype="link"/>
6652                         <field name="id" reporter:datatype="id" />
6653                         <field name="perm" reporter:datatype="link"/>
6654                 </fields>
6655                 <links>
6656                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6657                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6658                 </links>
6659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6660             <actions>
6661                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6662                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6663                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6664                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6665             </actions>
6666         </permacrud>
6667         </class>
6668         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6669                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6670                         <field name="items" oils_persist:virtual="true" />
6671                         <field name="btype" reporter:datatype="text"/>
6672                         <field name="id" reporter:datatype="id" />
6673                         <field name="name" reporter:datatype="text"/>
6674                         <field name="description" reporter:datatype="text"/>
6675                         <field name="owner" reporter:datatype="link"/>
6676                         <field name="pub" reporter:datatype="bool"/>
6677                         <field name="create_time" reporter:datatype="timestamp" />
6678                 </fields>
6679                 <links>
6680                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6681                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6682                 </links>
6683         </class>
6684         <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">
6685                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6686                         <field name="id" reporter:datatype="id" />
6687                         <field name="bucket" reporter:datatype="link"/>
6688                         <field name="note" reporter:datatype="text" />
6689                 </fields>
6690                 <links>
6691                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6692                 </links>
6693         </class>
6694         <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">
6695                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6696                         <field name="id" reporter:datatype="int" />
6697                         <field name="usr" reporter:datatype="link"/>
6698                         <field name="work_ou" reporter:datatype="link"/>
6699                 </fields>
6700                 <links>
6701                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6702                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6703                 </links>
6704         </class>
6705         <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">
6706                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6707                         <field name="depth" reporter:datatype="int"/>
6708                         <field name="grantable" reporter:datatype="bool"/>
6709                         <field name="id" reporter:datatype="id" />
6710                         <field name="perm" reporter:datatype="link"/>
6711                         <field name="usr" reporter:datatype="link"/>
6712                 </fields>
6713                 <links>
6714                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6715                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6716                 </links>
6717         </class>
6718         <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">
6719                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6720                         <field name="object_id" reporter:datatype="text"/>
6721                         <field name="grantable" reporter:datatype="bool"/>
6722                         <field name="id" reporter:datatype="id" />
6723                         <field name="perm" reporter:datatype="link"/>
6724                         <field name="usr" reporter:datatype="link"/>
6725                         <field name="object_type" reporter:datatype="text"/>
6726                 </fields>
6727                 <links>
6728                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6729                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6730                 </links>
6731         </class>
6732         <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">
6733                 <fields oils_persist:primary="id" oils_persist:sequence="">
6734                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6735                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6736                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6737                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6738                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6739                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6740                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6741                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6742                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6743                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6744                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6745                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6746                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6747                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6748                 </fields>
6749                 <links>
6750                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6751                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6752                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6753                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6754                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6755                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6756                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6757                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6758                 </links>
6759         </class>
6760         <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">
6761                 <fields oils_persist:primary="id" oils_persist:sequence="">
6762                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6763                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6764                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6765                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6766                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6767                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6768                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6769                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6770                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6771                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6772                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6773                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6774                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6775                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6776                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6777                 </fields>
6778                 <links>
6779                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6780                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6781                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6782                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6783                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6784                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6785                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6786                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6787                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6788                 </links>
6789         </class>
6790         <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">
6791                 <fields oils_persist:primary="id" oils_persist:sequence="">
6792                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6793                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6794                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6795                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6796                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6797                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6798                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6799                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6800                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6801                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6802                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6803                 </fields>
6804                 <links>
6805                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6806                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6807                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6808                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6809                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6810                 </links>
6811         </class>
6812         <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">
6813                 <fields oils_persist:primary="id" oils_persist:sequence="">
6814                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6815                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6816                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6817                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6818                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6819                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6820                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6821                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6822                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6823                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6824                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6825                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6826                 </fields>
6827                 <links>
6828                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6829                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6830                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6831                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6832                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6833                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6834                 </links>
6835         </class>
6836         <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">
6837                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6838                         <field name="bucket" reporter:datatype="link"/>
6839                         <field name="id" reporter:datatype="id" />
6840                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6841                         <field name="create_time" reporter:datatype="timestamp" />
6842                         <field name="pos" reporter:datatype="int" />
6843                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6844                 </fields>
6845                 <links>
6846                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6847                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6848             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6849                 </links>
6850         </class>
6851         <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">
6852                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6853                         <field name="id" reporter:datatype="id" />
6854                         <field name="item" reporter:datatype="link"/>
6855                         <field name="note" reporter:datatype="text" />
6856                 </fields>
6857                 <links>
6858                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6859                 </links>
6860         </class>
6861         <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">
6862                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6863                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6864                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6865                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6866                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6867                 </fields>
6868                 <links>
6869                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6870                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6871                 </links>
6872         </class>
6873     <class id="ascsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat_sip_fields" oils_persist:tablename="asset.stat_cat_sip_fields" reporter:label="SIP Statistical Category Field Identifier">
6874         <fields oils_persist:primary="field">
6875             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6876             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6877             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6878         </fields>
6879         <links/>
6880         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6881             <actions>
6882                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6883                 <retrieve />
6884                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6885                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6886             </actions>
6887         </permacrud>
6888     </class>
6889         <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">
6890                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6891                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6892                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6893                 </fields>
6894                 <links/>
6895         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6896             <actions>
6897                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6898                 <retrieve/>
6899                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6900                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6901             </actions>
6902         </permacrud>
6903         </class>
6904
6905
6906         <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">
6907                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6908                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6909                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6910                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6911                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6912                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6913                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6914                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6915                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6916                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6917                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6918                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6919                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6920                 </fields>
6921                 <links>
6922                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6923                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6924                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6925                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6926                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6927                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6928                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6929                 </links>
6930         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6931             <actions>
6932                 <create permission="TRANSIT_COPY">
6933                     <context link="target_copy" field="owner"/>
6934                 </create>
6935                 <retrieve/>
6936                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6937                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6938             </actions>
6939         </permacrud>
6940         </class>
6941         <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">
6942                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6943                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6944                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6945                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6946                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6947                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6948                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6949                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6950                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6951                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6952                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6953                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6954                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6955                 </fields>
6956                 <links>
6957                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6958                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6959                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6960                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6961                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6962                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6963                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6964                 </links>
6965         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6966             <actions>
6967                 <create permission="TRANSIT_COPY" context_field="owner">
6968                     <context link="target_copy" field="circ_lib"/>
6969                 </create>
6970                 <retrieve/>
6971                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6972                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6973             </actions>
6974         </permacrud>
6975         </class>
6976         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6977                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6978                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6979                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6980                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6981                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6982                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6983                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6984                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6985                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6986                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6987                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6988                 </fields>
6989                 <links>
6990                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6991                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6992                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6993                 </links>
6994         </class>
6995         <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">
6996                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6997                         <field name="grp" />
6998                         <field name="id" reporter:datatype="id" />
6999                         <field name="usr" />
7000                 </fields>
7001                 <links>
7002                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7003                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7004                 </links>
7005         </class>
7006         <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">
7007                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7008                         <field name="id" reporter:datatype="id" />
7009                         <field name="fq_field" reporter:datatype="text"/>
7010                         <field name="identity_value" reporter:datatype="text"/>
7011                         <field name="translation" reporter:datatype="text"/>
7012                         <field name="string" reporter:datatype="text"/>
7013                 </fields>
7014                 <links>
7015                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7016                 </links>
7017         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7018             <actions>
7019                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7020                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7021                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7022                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7023             </actions>
7024         </permacrud>
7025         </class>
7026         <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">
7027                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7028                         <field name="id" reporter:datatype="id" />
7029                         <field name="fm_class" reporter:datatype="text"/>
7030                         <field name="field" reporter:datatype="text"/>
7031                         <field name="owner" reporter:datatype="org_unit"/>
7032                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7033                 </fields>
7034                 <links>
7035                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7036                 </links>
7037         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7038             <actions>
7039                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7040                 <retrieve/>
7041                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7042                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7043             </actions>
7044         </permacrud>
7045         </class>
7046         <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">
7047                 <fields oils_persist:primary="code">
7048                         <field name="code" reporter:datatype="id" />
7049                         <field name="marc_code" reporter:datatype="text"/>
7050                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7051                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7052                 </fields>
7053                 <links/>
7054         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7055             <actions>
7056                 <create permission="CREATE_LOCALE" global_required="true"/>
7057                 <retrieve/>
7058                 <update permission="UPDATE_LOCALE" global_required="true"/>
7059                 <delete permission="DELETE_LOCALE" global_required="true"/>
7060             </actions>
7061         </permacrud>
7062         </class>
7063         <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">
7064                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7065                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7066                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7067                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7068             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7069                 </fields>
7070                 <links>
7071                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7072                 </links>
7073         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7074             <actions>
7075                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7076                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7077                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7078                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7079             </actions>
7080         </permacrud>
7081         </class>
7082
7083         <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">
7084                 <fields oils_persist:primary="id">
7085                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7086                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7087                 </fields>
7088                 <links/>
7089         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7090             <actions>
7091                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7092                 <retrieve/>
7093                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7094                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7095             </actions>
7096         </permacrud>
7097         </class>
7098
7099         <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">
7100                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7101                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7102                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7103                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7104                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7105                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7106                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7107                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7108                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7109                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7110                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7111                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7112                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7113                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7114                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7115                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7116                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7117                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7118                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7119                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7120                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7121                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7122                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7123                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7124                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7125                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7126                 </fields>
7127                 <links>
7128                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7129                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7130                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7131                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7132                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7133                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7134                 </links>
7135         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7136             <actions>
7137                 <create permission="user_request.create">
7138                     <context link="usr" field="home_ou"/>
7139                                 </create>
7140                 <retrieve permission="user_request.view">
7141                     <context link="usr" field="home_ou"/>
7142                                 </retrieve>
7143                 <update permission="user_request.update">
7144                     <context link="usr" field="home_ou"/>
7145                                 </update>
7146                 <delete permission="user_request.delete">
7147                     <context link="usr" field="home_ou"/>
7148                                 </delete>
7149             </actions>
7150         </permacrud>
7151         </class>
7152
7153         <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">
7154                 <fields oils_persist:primary="code">
7155                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7156                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7157                 </fields>
7158                 <links/>
7159         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7160             <actions>
7161                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7162                 <retrieve/>
7163                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7164                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7165             </actions>
7166         </permacrud>
7167         </class>
7168
7169         <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">
7170                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7171                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7172                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7173                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7174                         <field reporter:label="Ratio" name="ratio" />
7175                 </fields>
7176                 <links>
7177                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7178                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7179                 </links>
7180                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7181                         <actions>
7182                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7183                                 <retrieve/>
7184                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7185                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7186                         </actions>
7187                 </permacrud>
7188         </class>
7189
7190         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7191                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7192                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7193                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7194                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7195                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7196                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7197                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7198                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7199                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7200                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7201                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7202                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7203                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7204                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7205                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7206                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7207                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7208                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7209                 </fields>
7210                 <links>
7211                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7212                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7213             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7214             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7215             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7216                 </links>
7217         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7218             <actions>
7219                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7220                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7221                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7222                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7223             </actions>
7224         </permacrud>
7225         </class>
7226
7227         <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">
7228                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7229                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7230                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7231                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7232                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7233                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7234                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7235                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7236                 </fields>
7237                 <links>
7238                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7239                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7240                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7241                 </links>
7242         </class>
7243
7244         <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">
7245                 <fields oils_persist:primary="code">
7246                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7247                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7248                 </fields>
7249                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7250             <actions>
7251                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7252                 <retrieve/>
7253                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7254                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7255             </actions>
7256                 </permacrud>
7257         </class>
7258
7259         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7260                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7261                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7262                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7263                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7264                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7265                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7266                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7267                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7268                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7269                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7270                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7271                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7272                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7273                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7274                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7275                 </fields>
7276                 <links>
7277                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7278                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7279                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7280                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7281                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7282                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7283                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7284                 </links>
7285         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7286             <actions>
7287                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7288                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7289                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7290                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7291             </actions>
7292         </permacrud>
7293         </class>
7294
7295         <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">
7296                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7297                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7298                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7299                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7300                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7301                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7302                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7303                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7304                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7305                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7306                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7307                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7308                 </fields>
7309                 <links>
7310                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7311                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7312                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7313                 </links>
7314         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7315             <actions>
7316                 <create   permission="ADMIN_INVOICE">
7317                                         <context link="invoice" field="receiver"/>
7318                                 </create>
7319                 <retrieve permission="ADMIN_INVOICE">
7320                                         <context link="invoice" field="receiver"/>
7321                                 </retrieve>
7322                 <update   permission="ADMIN_INVOICE">
7323                                         <context link="invoice" field="receiver"/>
7324                                 </update>
7325                                 <delete   permission="ADMIN_INVOICE">
7326                                         <context link="invoice" field="receiver"/>
7327                                 </delete>
7328             </actions>
7329         </permacrud>
7330         </class>
7331
7332         <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">
7333                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7334                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7335                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7336                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7337                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7338                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7339                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7340                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7341                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7342                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7343                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7344                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7345                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7346                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7347                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7348                 </fields>
7349                 <links>
7350                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7351                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7352                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7353                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7354                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7355                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7356                 </links>
7357         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7358             <actions>
7359                 <create   permission="ADMIN_INVOICE">
7360                                         <context link="invoice" field="receiver"/>
7361                                 </create>
7362                 <retrieve permission="ADMIN_INVOICE">
7363                                         <context link="invoice" field="receiver"/>
7364                                 </retrieve>
7365                 <update   permission="ADMIN_INVOICE">
7366                                         <context link="invoice" field="receiver"/>
7367                                 </update>
7368                                 <delete   permission="ADMIN_INVOICE">
7369                                         <context link="invoice" field="receiver"/>
7370                                 </delete>
7371             </actions>
7372         </permacrud>
7373         </class>
7374
7375         <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">
7376                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7377                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7378                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7379                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7380                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7381                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7382                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7383                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7384                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7385                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7386                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7387                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7388                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7389                 </fields>
7390                 <links>
7391                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7392                 </links>
7393         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7394             <actions>
7395                 <create permission="ADMIN_PROVIDER">
7396                     <context link="provider" field="owner"/>
7397                 </create>
7398                 <retrieve permission="ADMIN_PROVIDER">
7399                     <context link="provider" field="owner"/>
7400                 </retrieve>
7401                 <update permission="ADMIN_PROVIDER">
7402                     <context link="provider" field="owner"/>
7403                 </update>
7404                 <delete permission="ADMIN_PROVIDER">
7405                     <context link="provider" field="owner"/>
7406                 </delete>
7407             </actions>
7408         </permacrud>
7409         </class>
7410
7411         <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">
7412                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7413                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7414                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7415                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7416                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7417                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7418                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7419         </fields>
7420                 <links>
7421                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7422                 </links>
7423         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7424             <actions>
7425                 <create permission="ADMIN_PROVIDER">
7426                     <context link="provider" field="owner"/>
7427                 </create>
7428                 <retrieve permission="ADMIN_PROVIDER">
7429                     <context link="provider" field="owner"/>
7430                 </retrieve>
7431                 <update permission="ADMIN_PROVIDER">
7432                     <context link="provider" field="owner"/>
7433                 </update>
7434                 <delete permission="ADMIN_PROVIDER">
7435                     <context link="provider" field="owner"/>
7436                 </delete>
7437             </actions>
7438         </permacrud>
7439     </class>
7440         <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">
7441                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7442                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7443                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7444                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7445                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7446                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7447                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7448                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7449                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7450                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7451                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7452                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7453                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7454                 </fields>
7455                 <links>
7456                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7457                 </links>
7458         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7459             <actions>
7460                 <create permission="ADMIN_PROVIDER">
7461                     <context link="contact" jump='provider' field="owner"/>
7462                 </create>
7463                 <retrieve permission="ADMIN_PROVIDER">
7464                     <context link="contact" jump='provider' field="owner"/>
7465                 </retrieve>
7466                 <update permission="ADMIN_PROVIDER">
7467                     <context link="contact" jump='provider' field="owner"/>
7468                 </update>
7469                 <delete permission="ADMIN_PROVIDER">
7470                     <context link="contact" jump='provider' field="owner"/>
7471                 </delete>
7472             </actions>
7473         </permacrud>
7474         </class>
7475
7476         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7477                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7478                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7479                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7480                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7481                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7482                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7483                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7484                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7485                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7486                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7487                 </fields>
7488                 <links>
7489                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7490                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7491                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7492                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7493                 </links>
7494         </class>
7495
7496         <class id="acqfc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
7497                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7498                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7499                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7500                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7501                 </fields>
7502                 <links>
7503             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7504                 </links>
7505                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7506                         <actions>
7507                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7508                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7509                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7510                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7511                         </actions>
7512                 </permacrud>
7513         </class>
7514
7515         <class id="acqfy" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
7516                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7517                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7518                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7519                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7520                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7521                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7522                 </fields>
7523                 <links>
7524                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7525                 </links>
7526                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7527                         <actions>
7528                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7529                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7530                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7531                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7532                         </actions>
7533                 </permacrud>
7534         </class>
7535
7536         <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">
7537                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7538                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7539                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7540                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7541                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7542                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7543                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7544                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7545                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7546                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7547                 </fields>
7548                 <links>
7549                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7550                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7551             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7552             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7553                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7554                 </links>
7555         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7556             <actions>
7557                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7558                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7559                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7560                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7561             </actions>
7562         </permacrud>
7563         </class>
7564
7565         <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">
7566                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7567                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7568                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7569                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7570                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7571                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7572                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7573                 </fields>
7574                 <links>
7575                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7576                 </links>
7577                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7578                         <actions>
7579                                 <create permission="ADMIN_FUNDING_SOURCE">
7580                     <context link="funding_source" field="owner"/>
7581                 </create>
7582                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7583                     <context link="funding_source" field="owner"/>
7584                 </retrieve>
7585                                 <update permission="ADMIN_FUNDING_SOURCE">
7586                     <context link="funding_source" field="owner"/>
7587                 </update>
7588                                 <delete permission="ADMIN_FUNDING_SOURCE">
7589                     <context link="funding_source" field="owner"/>
7590                 </delete>
7591                         </actions>
7592                 </permacrud>
7593         </class>
7594
7595         <class id="acqofscred" controller="open-ils.cstore" oils_obj:fieldmapper="acq::ordered_funding_source_credit" oils_persist:tablename="acq.ordered_funding_source_credit" reporter:label="Ordered Funding Source Credit">
7596                 <fields oils_persist:primary="id">
7597                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7598                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7599                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7600                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7601                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7602                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7603                 </fields>
7604                 <links>
7605                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7606                 </links>
7607         </class>
7608
7609         <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">
7610                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7611                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7612                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7613                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7614                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7615                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7616                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7617                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7618                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7619                 </fields>
7620                 <links>
7621                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7622                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7623                 </links>
7624                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7625                         <actions>
7626                                 <create permission="ADMIN_ACQ_FUND">
7627                     <context link="fund" field="org"/>
7628                 </create>
7629                                 <retrieve permission="ADMIN_ACQ_FUND">
7630                     <context link="fund" field="org"/>
7631                 </retrieve>
7632                                 <update permission="ADMIN_ACQ_FUND">
7633                     <context link="fund" field="org"/>
7634                 </update>
7635                                 <delete permission="ADMIN_ACQ_FUND">
7636                     <context link="fund" field="org"/>
7637                 </delete>
7638                         </actions>
7639                 </permacrud>
7640         </class>
7641
7642         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7643                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7644                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7645                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7646                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7647                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7648                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7649                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7650                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7651                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7652                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7653                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7654                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7655                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7656                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7657                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7658                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7659                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7660                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7661                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7662                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7663                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7664                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7665                 </fields>
7666                 <links>
7667                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7668                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7669             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7670             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7671             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7672             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7673             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7674             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7675             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7676             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7677             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7678                 </links>
7679         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
7680             <actions>
7681                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7682                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7683                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7684                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7685             </actions>
7686         </permacrud>
7687         </class>
7688
7689         <class id="acqfat" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_allocation_total" reporter:label="Fund Allocation Total">
7690                 <fields oils_persist:primary="fund">
7691                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7692                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7693                 </fields>
7694                 <links>
7695                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7696                 </links>
7697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7698             <actions>
7699                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7700                                         <context link="fund" field="org" />
7701                 </retrieve>
7702             </actions>
7703         </permacrud>
7704         </class>
7705
7706         <class id="acqfdt" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_debit_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_debit_total" reporter:label="Total Debit from Fund">
7707                 <fields oils_persist:primary="fund">
7708                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7709                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7710                 </fields>
7711                 <links>
7712                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7713                 </links>
7714         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7715             <actions>
7716                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7717                                         <context link="fund" field="org" />
7718                 </retrieve>
7719             </actions>
7720         </permacrud>
7721         </class>
7722
7723         <class id="acqfet" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_encumbrance_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_encumbrance_total" reporter:label="Total Fund Encumbrance">
7724                 <fields oils_persist:primary="fund">
7725                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7726                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7727                 </fields>
7728                 <links>
7729                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7730                 </links>
7731         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7732             <actions>
7733                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7734                                         <context link="fund" field="org" />
7735                 </retrieve>
7736             </actions>
7737         </permacrud>
7738         </class>
7739
7740         <class id="acqfst" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_spent_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_spent_total" reporter:label="Total Spent from Fund">
7741                 <fields oils_persist:primary="fund">
7742                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7743                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7744                 </fields>
7745                 <links>
7746                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7747                 </links>
7748         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7749             <actions>
7750                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7751                                         <context link="fund" field="org" />
7752                 </retrieve>
7753             </actions>
7754         </permacrud>
7755         </class>
7756
7757         <class id="acqfcb" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_combined_balance" oils_persist:readonly="true" oils_persist:tablename="acq.fund_combined_balance" reporter:label="Fund Combined Balance">
7758                 <fields oils_persist:primary="fund">
7759                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7760                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7761                 </fields>
7762                 <links>
7763                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7764                 </links>
7765         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7766             <actions>
7767                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7768                                         <context link="fund" field="org" />
7769                 </retrieve>
7770             </actions>
7771         </permacrud>
7772         </class>
7773
7774    <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">
7775         <fields oils_persist:primary="fund">
7776             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7777             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7778         </fields>
7779         <links>
7780             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7781         </links>
7782     </class>
7783
7784    <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">
7785         <fields oils_persist:primary="fund">
7786             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7787             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7788         </fields>
7789         <links>
7790             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7791         </links>
7792     </class>
7793
7794    <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">
7795         <fields oils_persist:primary="fund">
7796             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7797             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7798         </fields>
7799         <links>
7800             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7801         </links>
7802     </class>
7803
7804    <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">
7805         <fields oils_persist:primary="fund">
7806             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7807             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7808         </fields>
7809         <links>
7810             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7811         </links>
7812     </class>
7813
7814    <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">
7815         <fields oils_persist:primary="fund">
7816             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7817             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7818         </fields>
7819         <links>
7820             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7821         </links>
7822     </class>
7823
7824         <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">
7825                 <fields oils_persist:primary="funding_source">
7826                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7827                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7828                 </fields>
7829                 <links>
7830                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7831                 </links>
7832         </class>
7833
7834         <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">
7835                 <fields oils_persist:primary="funding_source">
7836                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7837                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7838                 </fields>
7839                 <links>
7840                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7841                 </links>
7842         </class>
7843
7844         <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">
7845                 <fields oils_persist:primary="funding_source">
7846                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7847                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7848                 </fields>
7849                 <links>
7850                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7851                 </links>
7852         </class>
7853
7854         <class id="acqfsb" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_spent_balance" oils_persist:readonly="true" oils_persist:tablename="acq.fund_spent_balance" reporter:label="Fund Spent Balance">
7855                 <fields oils_persist:primary="fund">
7856                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7857                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7858                 </fields>
7859                 <links>
7860                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7861                 </links>
7862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7863             <actions>
7864                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7865                                         <context link="fund" field="org" />
7866                 </retrieve>
7867             </actions>
7868         </permacrud>
7869     </class>
7870     <class id="acqfsum" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_summary" reporter:label="Fund Summary" reporter:core="true" oils_persist:readonly="true">
7871         <oils_persist:source_definition><![CDATA[
7872             SELECT
7873                 acqf.*,
7874                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7875                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7876                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7877                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7878             FROM
7879                 acq.fund acqf
7880                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7881                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7882                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7883                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7884         ]]></oils_persist:source_definition>
7885         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7886             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7887             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7888             <field reporter:label="Name" name="name" reporter:datatype="text" />
7889             <field reporter:label="Year" name="year" reporter:datatype="int" />
7890             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7891             <field reporter:label="Code" name="code" reporter:datatype="text" />
7892             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7893             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7894             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7895             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7896             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7897
7898             <!-- non fund-native fields -->
7899             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7900             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7901             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7902             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7903         </fields>
7904         <links>
7905             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7906             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7907             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7908         </links>
7909         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7910             <actions>
7911                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7912             </actions>
7913         </permacrud>
7914         </class>
7915         <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">
7916                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7917                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7918                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7919                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7920                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7921                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7922                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7923                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7924                 </fields>
7925                 <links>
7926                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7927                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7928                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7929                 </links>
7930                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7931                         <actions>
7932                                 <create permission="ADMIN_ACQ_FUND">
7933                     <context link="fund" field="org"/>
7934                 </create>
7935                                 <retrieve permission="ADMIN_ACQ_FUND">
7936                     <context link="fund" field="org"/>
7937                 </retrieve>
7938                                 <update permission="ADMIN_ACQ_FUND">
7939                     <context link="fund" field="org"/>
7940                 </update>
7941                                 <delete permission="ADMIN_ACQ_FUND">
7942                     <context link="fund" field="org"/>
7943                 </delete>
7944                         </actions>
7945                 </permacrud>
7946         </class>
7947
7948     <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">
7949         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7950             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7951             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7952             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7953             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7954             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7955             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7956             <field reporter:label="Note" name="note" reporter:datatype="text" />
7957             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7958         </fields>
7959         <links>
7960             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7961             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7962             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7963         </links>
7964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7965                         <actions>
7966                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7967                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7968                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7969                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7970                         </actions>
7971                 </permacrud>
7972     </class>
7973
7974         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7975                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7976                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7977                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7978                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7979                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7980                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7981                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7982                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7983                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7984                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7985                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7986                 </fields>
7987                 <links>
7988                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7989                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7990                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7991                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7992                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7993                 </links>
7994                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7995                         <actions>
7996                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7997                         </actions>
7998                 </permacrud>
7999         </class>
8000
8001         <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">
8002                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8003                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8004                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8005                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8006                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8007                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8008                 </fields>
8009                 <links>
8010                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8011                 </links>
8012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8013                         <actions>
8014                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8015                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8016                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8017                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8018                         </actions>
8019                 </permacrud>
8020         </class>
8021
8022         <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">
8023                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8024                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8025                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8026                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8027                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8028                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8029                         <field reporter:label="State" name="state" reporter:datatype="text" />
8030                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8031                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8032                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8033                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8034                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8035                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8036                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8037                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8038                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8039                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8040                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8041                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8042                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8043                 </fields>
8044                 <links>
8045                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8046                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8047                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8048                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8049                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8050                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8051                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8052                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8053                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8054                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8055                 </links>
8056                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8057                         <actions>
8058                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8059                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8060                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8061                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8062                         </actions>
8063                 </permacrud>
8064         </class>
8065
8066         <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">
8067                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8068                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8069                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8070                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8071                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8072                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8073                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8074                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8075                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8076                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8077                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8078                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8079                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8080                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8081                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8082                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8083                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8084                 </fields>
8085                 <links>
8086                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8087                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8088                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8089                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8090                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8091                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8092                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8093                 </links>
8094                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8095             <actions>
8096                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8097             </actions>
8098                 </permacrud>
8099         </class>
8100
8101         <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">
8102                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8103                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8104                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8105                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8106                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8107                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8108                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8109                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8110                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8111                 </fields>
8112                 <links>
8113                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8114                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8115                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8116                 </links>
8117                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8118             <actions>
8119                 <create permission="CREATE_PURCHASE_ORDER">
8120                     <context link="purchase_order" field="ordering_agency"/>
8121                 </create>
8122                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8123                     <context link="purchase_order" field="ordering_agency"/>
8124                 </retrieve>
8125                 <update permission="CREATE_PURCHASE_ORDER">
8126                     <context link="purchase_order" field="ordering_agency"/>
8127                 </update>
8128                 <delete permission="CREATE_PURCHASE_ORDER">
8129                     <context link="purchase_order" field="ordering_agency"/>
8130                 </delete>
8131             </actions>
8132                 </permacrud>
8133         </class>
8134
8135         <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">
8136                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8137                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8138                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8139                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8140                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8141                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8142                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8143                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8144                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8145                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8146                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8147                 </fields>
8148                 <links>
8149                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8150                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8151                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8152                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8153                 </links>
8154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8155             <actions>
8156                 <create permission="CREATE_PURCHASE_ORDER">
8157                     <context link="purchase_order" field="ordering_agency"/>
8158                 </create>
8159                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8160                     <context link="purchase_order" field="ordering_agency"/>
8161                 </retrieve>
8162                 <update permission="CREATE_PURCHASE_ORDER">
8163                     <context link="purchase_order" field="ordering_agency"/>
8164                 </update>
8165                 <delete permission="CREATE_PURCHASE_ORDER">
8166                     <context link="purchase_order" field="ordering_agency"/>
8167                 </delete>
8168             </actions>
8169                 </permacrud>
8170         </class>
8171
8172         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8173                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8174                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8175                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8176                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8177                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8178                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8179                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8180                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8181                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8182                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8183                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8184                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8185                         <field reporter:label="State" name="state" reporter:datatype="text" />
8186                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8187                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8188                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8189                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8190                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8191                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8192                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8193                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8194                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8195                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8196                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8197                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8198                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8199                 </fields>
8200                 <links>
8201                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8202                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8203                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8204                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8205                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8206                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8207                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8208                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8209                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8210                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8211                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8212                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8213                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8214                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8215                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8216                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8217                 </links>
8218                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8219                         <actions>
8220                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8221                                         <context link="purchase_order" field="ordering_agency"/>
8222                                         <context link="picklist" field="org_unit"/>
8223                                 </retrieve>
8224                         </actions>
8225                 </permacrud>
8226         </class>
8227
8228         <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">
8229                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8230                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8231                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8232                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8233                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8234                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8235                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8236                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8237                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8238                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8239                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8240                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8241                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8242                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8243                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8244                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8245                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8246                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8247                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8248                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8249                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8250                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8251                 </fields>
8252                 <links>
8253                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8254                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8255                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8256                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8257                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8258                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8259                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8260                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8261                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8262                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8263                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8264                 </links>
8265                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8266                         <actions>
8267                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8268                                         <context link="purchase_order" field="ordering_agency"/>
8269                                         <context link="picklist" field="org_unit"/>
8270                                 </retrieve>
8271                         </actions>
8272                 </permacrud>
8273         </class>
8274
8275         <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">
8276                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8277                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8278                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8279                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8280                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8281                 </fields>
8282                 <links>
8283                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8284                 </links>
8285                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8286                         <actions>
8287                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8288                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8289                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8290                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8291                         </actions>
8292                 </permacrud>
8293         </class>
8294
8295         <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">
8296                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8297                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8298                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8299                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8300                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8301                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8302                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8303                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8304                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8305                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8306                 </fields>
8307                 <links>
8308                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8309                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8310                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8311                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8312                 </links>
8313         </class>
8314
8315         <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">
8316                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8317                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8318                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8319                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8320                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8321                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8322                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8323                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8324                 </fields>
8325                 <links>
8326                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8327                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8328                 </links>
8329         </class>
8330
8331         <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">
8332                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8333                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8334                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8335                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8336                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8337                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8338                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8339                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8340                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8341                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8342                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8343                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8344                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8345                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8346                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8347                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8348                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8349                 </fields>
8350                 <links>
8351                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8352                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8353                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8354                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8355                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8356                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8357                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8358                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8359                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8360                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8361                 </links>
8362         </class>
8363
8364         <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">
8365                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8366                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8367                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8368                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8369                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8370                 </fields>
8371                 <links/>
8372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8373                         <actions>
8374                                 <retrieve />
8375                         </actions>
8376                 </permacrud>
8377         </class>
8378
8379         <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">
8380                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8381                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8382                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8383                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8384                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8385                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8386             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8387                 </fields>
8388                 <links/>
8389         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8390             <actions>
8391                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8392                 <retrieve />
8393                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8394                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8395             </actions>
8396         </permacrud>
8397         </class>
8398
8399         <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">
8400                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8401                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8402                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8403                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8404                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8405                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8406                 </fields>
8407                 <links/>
8408         </class>
8409         <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">
8410                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8411                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8412                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8413                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8414                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8415                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8416                 </fields>
8417                 <links>
8418                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8419                 </links>
8420         </class>
8421
8422         <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">
8423             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8424                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8425                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8426                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8427                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8428                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8429                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8430         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8431
8432             </fields>
8433             <links>
8434                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8435             </links>
8436             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8437                 <actions>
8438                     <create permission="ADMIN_PROVIDER">
8439                         <context link="provider" field="owner"/>
8440                     </create>
8441                     <retrieve permission="ADMIN_PROVIDER">
8442                         <context link="provider" field="owner"/>
8443                     </retrieve>
8444                     <update permission="ADMIN_PROVIDER">
8445                         <context link="provider" field="owner"/>
8446                     </update>
8447                     <delete permission="ADMIN_PROVIDER">
8448                         <context link="provider" field="owner"/>
8449                     </delete>
8450                 </actions>
8451             </permacrud>
8452         </class>
8453         
8454         <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">
8455             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8456                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8457                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8458                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8459                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8460             </fields>
8461             <links>
8462                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8463             </links>
8464             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8465                 <actions>
8466                     <create permission="ADMIN_PROVIDER">
8467                         <context link="provider" field="owner"/>
8468                     </create>
8469                     <retrieve permission="ADMIN_PROVIDER">
8470                         <context link="provider" field="owner"/>
8471                     </retrieve>
8472                     <update permission="ADMIN_PROVIDER">
8473                         <context link="provider" field="owner"/>
8474                     </update>
8475                     <delete permission="ADMIN_PROVIDER">
8476                         <context link="provider" field="owner"/>
8477                     </delete>
8478                 </actions>
8479             </permacrud>
8480         </class>
8481         
8482         <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">
8483             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8484                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8485                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8486                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8487                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8488                 </fields>
8489                 <links/>
8490         </class>
8491
8492         <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">
8493                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8494                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8495                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8496                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8497                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8498                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8499                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8500                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8501                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8502                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8503                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8504                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8505                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8506                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8507                 </fields>
8508                 <links>
8509                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8510                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8511                 </links>
8512         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8513             <actions>
8514                 <create permission="ADMIN_PROVIDER">
8515                     <context link="provider" field="owner"/>
8516                 </create>
8517                 <retrieve permission="ADMIN_PROVIDER">
8518                     <context link="provider" field="owner"/>
8519                 </retrieve>
8520                 <update permission="ADMIN_PROVIDER">
8521                     <context link="provider" field="owner"/>
8522                 </update>
8523                 <delete permission="ADMIN_PROVIDER">
8524                     <context link="provider" field="owner"/>
8525                 </delete>
8526             </actions>
8527         </permacrud>
8528         </class>
8529
8530         <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">
8531                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8532                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8533                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8534                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8535                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8536                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8537                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8538                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8539                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8540                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8541                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8542                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8543                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8544                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8545                 </fields>
8546                 <links>
8547                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8548                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8549                 </links>
8550         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8551             <actions>
8552                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8553                     <context link="account" jump="provider" field="owner"/>
8554                 </retrieve>
8555                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8556                     <context link="account" jump="provider" field="owner"/>
8557                 </update>
8558                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8559                     <context link="account" jump="provider" field="owner"/>
8560                 </delete>
8561             </actions>
8562         </permacrud>
8563         </class>
8564
8565
8566         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8567                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8568                         <field name="id" reporter:datatype="id" />
8569                         <field name="parent" reporter:datatype="link"/>
8570                         <field name="owner" reporter:datatype="link"/>
8571                         <field name="create_time" reporter:datatype="timestamp"/>
8572                         <field name="name" reporter:datatype="text"/>
8573                         <field name="shared" reporter:datatype="bool"/>
8574                         <field name="share_with" reporter:datatype="link"/>
8575                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8576                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8577                 </fields>
8578                 <links>
8579                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8580                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8581                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8582                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8583                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8584                 </links>
8585         </class>
8586         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8587                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8588                         <field name="id" reporter:datatype="id" />
8589                         <field name="parent" reporter:datatype="link"/>
8590                         <field name="owner" reporter:datatype="link"/>
8591                         <field name="create_time" reporter:datatype="timestamp"/>
8592                         <field name="name" reporter:datatype="text"/>
8593                         <field name="shared" reporter:datatype="bool"/>
8594                         <field name="share_with" reporter:datatype="link"/>
8595                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8596                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8597                 </fields>
8598                 <links>
8599                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8600                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8601                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8602                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8603                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8604                 </links>
8605         </class>
8606         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8607                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8608                         <field name="id" reporter:datatype="id" />
8609                         <field name="parent" reporter:datatype="link"/>
8610                         <field name="owner" reporter:datatype="link"/>
8611                         <field name="create_time" reporter:datatype="timestamp"/>
8612                         <field name="name" reporter:datatype="text"/>
8613                         <field name="shared" reporter:datatype="bool"/>
8614                         <field name="share_with" reporter:datatype="link"/>
8615                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8616                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8617                 </fields>
8618                 <links>
8619                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8620                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8621                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8622                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8623                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8624                 </links>
8625         </class>
8626         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8627                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8628                         <field name="id" reporter:datatype="id" />
8629                         <field name="owner" reporter:datatype="link"/>
8630                         <field name="create_time" reporter:datatype="timestamp"/>
8631                         <field name="name" reporter:datatype="text"/>
8632                         <field name="data" reporter:datatype="text"/>
8633                         <field name="folder" reporter:datatype="link"/>
8634                         <field name="description" reporter:datatype="text"/>
8635                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8636                 </fields>
8637                 <links>
8638                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8639                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8640                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8641                 </links>
8642         </class>
8643         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8644                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8645                         <field name="id" reporter:datatype="id" />
8646                         <field name="owner" reporter:datatype="link"/>
8647                         <field name="create_time" reporter:datatype="timestamp"/>
8648                         <field name="template" reporter:datatype="link"/>
8649                         <field name="data" reporter:datatype="text"/>
8650                         <field name="folder" reporter:datatype="link"/>
8651                         <field name="recur" reporter:datatype="bool"/>
8652                         <field name="recurrence" reporter:datatype="interval"/>
8653                         <field name="name" reporter:datatype="text"/>
8654                         <field name="description" reporter:datatype="text"/>
8655                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8656                 </fields>
8657                 <links>
8658                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8659                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8660                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8661                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8662                 </links>
8663         </class>
8664         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8665                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8666                         <field name="id" reporter:datatype="id" />
8667                         <field name="runner" reporter:datatype="link"/>
8668                         <field name="start_time" reporter:datatype="timestamp"/>
8669                         <field name="complete_time" reporter:datatype="timestamp"/>
8670                         <field name="run_time" reporter:datatype="timestamp"/>
8671                         <field name="email" reporter:datatype="text"/>
8672                         <field name="excel_format" reporter:datatype="bool"/>
8673                         <field name="csv_format" reporter:datatype="bool"/>
8674                         <field name="html_format" reporter:datatype="bool"/>
8675                         <field name="error_code" reporter:datatype="int"/>
8676                         <field name="error_text" reporter:datatype="text"/>
8677                         <field name="report" reporter:datatype="link"/>
8678                         <field name="folder" reporter:datatype="link"/>
8679                         <field name="chart_pie" reporter:datatype="bool"/>
8680                         <field name="chart_bar" reporter:datatype="bool"/>
8681                         <field name="chart_line" reporter:datatype="bool"/>
8682                 </fields>
8683                 <links>
8684                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8685                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8686                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8687                 </links>
8688         </class>
8689         <class id="rmsr" controller="open-ils.reporter-store open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
8690                 <fields oils_persist:primary="id">
8691                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8692                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8693                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8694                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8695                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8696                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8697                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8698                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8699                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8700                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8701                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8702                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8703                 </fields>
8704                 <links>
8705                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8706                 </links>
8707                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8708                         <actions>
8709                                 <retrieve />
8710                         </actions>
8711                 </permacrud>
8712         </class>
8713         <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">
8714                 <fields oils_persist:primary="id">
8715                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8716                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8717                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8718                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8719                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8720                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8721                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8722                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8723                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8724                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8725                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8726                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8727                 </fields>
8728                 <links>
8729                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8730                 </links>
8731         </class>
8732         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8733                 <fields oils_persist:primary="id">
8734                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8735                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8736                         <field reporter:label="Fingerprint" name="fingerprint" />
8737                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8738                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8739                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8740                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8741                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8742                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8743                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8744                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8745                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8746                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8747                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8748                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8749                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8750                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8751                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8752                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8753                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8754                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8755                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8756                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8757                 </fields>
8758                 <links>
8759                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8760                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8761                 </links>
8762         </class>
8763         <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">
8764                 <fields oils_persist:primary="id">
8765                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8766                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8767                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8768                 </fields>
8769                 <links>
8770                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8771                 </links>
8772         </class>
8773         <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">
8774                 <fields oils_persist:primary="id">
8775                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8776                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8777                 </fields>
8778                 <links>
8779                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8780                 </links>
8781         </class>
8782         <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">
8783                 <fields oils_persist:primary="id">
8784                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8785                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8786                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8787                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8788                 </fields>
8789                 <links>
8790                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8791                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8792                 </links>
8793         </class>
8794         <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">
8795                 <fields oils_persist:primary="xact">
8796                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8797                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8798                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8799                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8800                 </fields>
8801                 <links>
8802                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8803                 </links>
8804         </class>
8805         <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">
8806                 <fields oils_persist:primary="xact">
8807                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8808                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8809                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8810                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8811                 </fields>
8812                 <links>
8813                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8814                 </links>
8815         </class>
8816         <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)">
8817                 <fields oils_persist:primary="id">
8818                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8819                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8820                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8821                 </fields>
8822                 <links>
8823                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8824                 </links>
8825         </class>
8826         <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">
8827                 <fields oils_persist:primary="id">
8828                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8829                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8830                 </fields>
8831                 <links>
8832                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8833                 </links>
8834         </class>
8835         <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">
8836                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8837                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
8838                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8839                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8840                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8841                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8842                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8843                 </fields>
8844                 <links>
8845                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8846                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8847                 </links>
8848                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8849                         <actions>
8850                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8851                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8852                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8853                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8854                         </actions>
8855                 </permacrud>
8856         </class>
8857         <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">
8858                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8859                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8860                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8861                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8862                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8863                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8864                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8865                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8866                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
8867                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
8868                 </fields>
8869                 <links>
8870                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8871                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8872                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8873                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8874                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8875                 </links>
8876                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8877                         <actions>
8878                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8879                                         <context link="formula" field="owner"/>
8880                                 </create>
8881                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8882                                         <context link="formula" field="owner"/>
8883                                 </retrieve>
8884                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8885                                         <context link="formula" field="owner"/>
8886                                 </update>
8887                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8888                                         <context link="formula" field="owner"/>
8889                                 </delete>
8890                         </actions>
8891                 </permacrud>
8892         </class>
8893
8894         <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">
8895                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8896                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8897                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8898                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8899                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8900                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8901                 </fields>
8902                 <links>
8903                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8904                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8905                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8906                 </links>
8907                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8908                         <actions>
8909                                 <create permission="CREATE_PURCHASE_ORDER">
8910                                         <context link="formula" field="owner"/>
8911                 </create>
8912                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8913                                         <context link="formula" field="owner"/>
8914                 </retrieve>
8915                                 <update permission="CREATE_PURCHASE_ORDER">
8916                                         <context link="formula" field="owner"/>
8917                 </update>
8918                                 <delete permission="CREATE_PURCHASE_ORDER">
8919                                         <context link="formula" field="owner"/>
8920                 </delete>
8921                         </actions>
8922                 </permacrud>
8923         </class>
8924
8925         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8926                 <fields oils_persist:primary="id">
8927                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8928                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8929                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8930                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8931                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8932                 </fields>
8933                 <links>
8934                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8935                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8936                 </links>
8937         </class>
8938
8939         <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">
8940                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8941                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8942                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8943                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8944                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8945                 </fields>
8946                 <links>
8947                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8948                 </links>
8949                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8950                         <actions>
8951                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8952                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8953                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8954                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8955                         </actions>
8956                 </permacrud>
8957         </class>
8958
8959         <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">
8960                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8961                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8962                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8963                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8964                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8965                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8966                 </fields>
8967                 <links>
8968                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8969                 </links>
8970                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8971                         <actions>
8972                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8973                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8974                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8975                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8976                         </actions>
8977                 </permacrud>
8978         </class>
8979
8980         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8981                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8982                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8983                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8984                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8985                 </fields>
8986                 <links>
8987                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8988                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8989                 </links>
8990         </class>
8991
8992         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8993                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8994                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8995                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8996                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8997                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8998                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8999                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9000                 </fields>
9001                 <links>
9002                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9003                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9004                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9005                 </links>
9006         </class>
9007
9008         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9009                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9010                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9011                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9012                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9013                 </fields>
9014                 <links>
9015                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9016                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9017                 </links>
9018         </class>
9019
9020         <class id="acqscle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim_event" oils_persist:tablename="acq.serial_claim_event" reporter:label="Serial Claim Event">
9021                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9022                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9023                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9024                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9025                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9026                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9027                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9028                 </fields>
9029                 <links>
9030                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9031                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9032                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9033                 </links>
9034         </class>
9035
9036         <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">
9037                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9038                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9039                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9040                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9041                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9042                 </fields>
9043                 <links>
9044                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9045                 </links>
9046                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9047             <actions>
9048                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9049                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9050                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9051                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9052             </actions>
9053                 </permacrud>
9054         </class>
9055
9056         <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">
9057                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9058                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9059                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9060                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9061                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9062                 </fields>
9063                 <links>
9064                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9065                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9066                 </links>
9067                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9068                         <actions>
9069                                 <create permission="ADMIN_CLAIM_POLICY">
9070                                         <context link="claim_policy" field="org_unit"/>
9071                 </create>
9072                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9073                                         <context link="claim_policy" field="org_unit"/>
9074                 </retrieve>
9075                                 <update permission="ADMIN_CLAIM_POLICY">
9076                                         <context link="claim_policy" field="org_unit"/>
9077                 </update>
9078                                 <delete permission="ADMIN_CLAIM_POLICY">
9079                                         <context link="claim_policy" field="org_unit"/>
9080                 </delete>
9081                         </actions>
9082                 </permacrud>
9083         </class>
9084
9085     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9086         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9087             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9088             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9089             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9090             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9091             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9092             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9093             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9094             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9095             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9096             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9097             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9098             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9099             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9100             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9101             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9102             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9103         </fields>
9104         <links>
9105             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9106         </links>
9107     </class>
9108
9109     <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">
9110         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9111             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9112             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9113             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9114             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9115             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9116         </fields>
9117     </class>
9118
9119     <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">
9120         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9121             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9122             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9123             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9124             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9125             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9126             <field reporter:label="City" name="city" reporter:datatype="text"/>
9127             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9128             <field reporter:label="State" name="state" reporter:datatype="text"/>
9129             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9130             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9131             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9132         </fields>
9133     </class>
9134
9135     <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">
9136         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9137             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9138             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9139             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9140             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9141             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9142             <field reporter:label="City" name="city" reporter:datatype="text"/>
9143             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9144             <field reporter:label="State" name="state" reporter:datatype="text"/>
9145             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9146             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9147             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9148         </fields>
9149     </class>
9150
9151     <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">
9152         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9153             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9154             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9155             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9156             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9157             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9158             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9159         </fields>
9160     </class>
9161
9162         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9163                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9164                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9165                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9166                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9167                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9168                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9169                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9170                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9171                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9172                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9173                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9174                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9175                 </fields>
9176                 <links>
9177                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9178                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9179                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9180                 </links>
9181         </class>
9182
9183         <class id="afscv" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
9184                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9185                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9186                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9187                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9188                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9189                 </fields>
9190                 <links>
9191                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9192                 </links>
9193         </class>
9194
9195     <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">
9196         <fields>
9197             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9198             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9199             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9200         </fields>
9201                 <links>
9202                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9203                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9204                 </links>
9205     </class>
9206
9207     <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">
9208         <fields>
9209             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9210             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9211         </fields>
9212                 <links>
9213                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9214                 </links>
9215     </class>
9216
9217     <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">
9218         <fields>
9219             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9220             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9221             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9222         </fields>
9223                 <links>
9224                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9225                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9226                 </links>
9227     </class>
9228
9229     <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">
9230         <fields>
9231             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9232             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9233         </fields>
9234                 <links>
9235                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9236                 </links>
9237     </class>
9238
9239     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9240                 <oils_persist:source_definition>
9241
9242             SELECT  DISTINCT l.*
9243               FROM  action.unfulfilled_hold_loops l
9244                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9245               WHERE l.count = m.max
9246
9247                 </oils_persist:source_definition>
9248         <fields>
9249             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9250             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9251             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9252         </fields>
9253                 <links>
9254                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9255                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9256                 </links>
9257     </class>
9258
9259         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9260                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9261                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9262                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9263                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9264                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9265                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9266                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9267                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9268                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9269                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9270                 </fields>
9271                 <links>
9272                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9273                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9274                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9275                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9276                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9277                 </links>
9278         </class>
9279
9280         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9281                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9282                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9283                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9284                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9285                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9286                 </fields>
9287                 <links>
9288                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9289                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9290                 </links>
9291         </class>
9292
9293         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9294                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9295                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9296                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9297                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9298                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9299                 </fields>
9300                 <links>
9301                 </links>
9302         </class>
9303
9304         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9305                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9306                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9307                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9308                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9309                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9310                 </fields>
9311                 <links>
9312                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9313                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9314                 </links>
9315         </class>
9316         
9317         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9318                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9319                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9320                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9321                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9322                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9323                 </fields>
9324                 <links>
9325                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9326                 </links>
9327         </class>
9328         
9329         <class id="qfpd" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_param_def" oils_persist:tablename="query.function_param_def" reporter:label="Function Parameter Definition">
9330                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9331                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9332                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9333                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9334                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9335                 </fields>
9336                 <links>
9337                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9338                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9339                 </links>
9340         </class>
9341
9342         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9343                 <fields oils_persist:primary="name">
9344                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9345                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9346                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9347                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9348                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9349                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9350                 </fields>
9351                 <links>
9352                 </links>
9353         </class>
9354
9355         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9356                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9357                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9358                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9359                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9360                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9361                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9362                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9363                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9364                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9365                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9366                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9367                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9368                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9369                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9370                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9371                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9372                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9373                 </fields>
9374                 <links>
9375                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9376                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9377                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9378                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9379                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9380                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9381                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9382                 </links>
9383         </class>
9384
9385         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9386                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9387                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9388                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9389                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9390                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9391                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9392                 </fields>
9393                 <links>
9394                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9395                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9396                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9397                 </links>
9398         </class>
9399
9400         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9401                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9402                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9403                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9404                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9405                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9406                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9407                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9408                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9409                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9410                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9411                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9412                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9413                 </fields>
9414                 <links>
9415                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9416                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9417                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9418                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9419                 </links>
9420         </class>
9421
9422         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9423                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9424                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9425                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9426                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9427                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9428                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9429                 </fields>
9430                 <links>
9431                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9432                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9433                 </links>
9434         </class>
9435
9436         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9437                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9438                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9439                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9440                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9441                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9442                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9443                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9444                 </fields>
9445                 <links>
9446                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9447                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9448                 </links>
9449         </class>
9450
9451         <class id="qobi" controller="open-ils.cstore" oils_obj:fieldmapper="query::order_by_item" oils_persist:tablename="query.order_by_item" reporter:label="Order By Item">
9452                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9453                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9454                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9455                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9456                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9457                 </fields>
9458                 <links>
9459                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9460                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9461                 </links>
9462         </class>
9463
9464         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9465                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9466                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9467                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9468                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9469                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9470                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9471                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9472                 </fields>
9473                 <links>
9474                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9475                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9476                 </links>
9477         </class>
9478
9479         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9480                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9481                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9482                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9483                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9484                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9485                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9486                 </fields>
9487                 <links>
9488                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9489                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9490                 </links>
9491         </class>
9492
9493         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9494                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9495                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9496                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9497                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9498                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9499                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9500                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9501                 </fields>
9502                 <links>
9503                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9504                 </links>
9505         </class>
9506
9507         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9508                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9509                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9510                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9511                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9512                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9513                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9514                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9515                 </fields>
9516                 <links>
9517                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9518                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9519                 </links>
9520         </class>
9521
9522         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9523                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9524                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9525                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9526                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9527                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9528                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9529                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9530                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9531                 </fields>
9532                 <links>
9533                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9534                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9535                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9536                 </links>
9537         </class>
9538
9539         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9540                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9541                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9542                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9543                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9544                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9545                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9546                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9547                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9548                 </fields>
9549                 <links>
9550                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9551                 </links>
9552         </class>
9553
9554         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9555                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9556                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9557                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9558                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9559                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9560                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9561                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9562                 </fields>
9563                 <links>
9564                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9565                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9566                 </links>
9567         </class>
9568
9569         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9570                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9571                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9572                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9573                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9574                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9575                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9576                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9577                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9578                 </fields>
9579                 <links>
9580                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9581                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9582                 </links>
9583         </class>
9584
9585         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9586                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9587                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9588                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9589                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9590                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9591                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9592                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9593                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9594                 </fields>
9595                 <links>
9596                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9597                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9598                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9599                 </links>
9600         </class>
9601
9602         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9603                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9604                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9605                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9606                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9607                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9608                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9609                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9610                 </fields>
9611                 <links>
9612                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9613                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9614                 </links>
9615         </class>
9616
9617         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9618                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9619                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9620                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9621                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9622                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9623                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9624                 </fields>
9625                 <links>
9626                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9627                 </links>
9628         </class>
9629
9630         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9631                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9632                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9633                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9634                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9635                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9636                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9637                 </fields>
9638                 <links>
9639                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9640                 </links>
9641         </class>
9642
9643         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9644                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9645                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9646                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9647                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9648                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9649                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9650                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9651                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9652                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9653                 </fields>
9654                 <links>
9655                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9656                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9657                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9658                 </links>
9659         </class>
9660
9661         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9662                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9663                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9664                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9665                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9666                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9667                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9668                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9669                 </fields>
9670                 <links>
9671                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9672                 </links>
9673         </class>
9674
9675         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9676                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9677                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9678                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9679                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9680                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9681                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9682                 </fields>
9683                 <links>
9684                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9685                 </links>
9686         </class>
9687
9688         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9689                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9690                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9691                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9692                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9693                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9694                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9695                 </fields>
9696                 <links>
9697                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9698                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9699                 </links>
9700         </class>
9701
9702         <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">
9703                 <fields oils_persist:primary="id">
9704                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9705                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9706                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9707                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9708                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9709                 </fields>
9710                 <links>
9711                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9712                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9713                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9714                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9715                 </links>
9716         </class>
9717
9718         <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">
9719                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9720                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9721                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9722                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9723                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9724                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9725                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9726                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9727                 </fields>
9728                 <links/>
9729                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9730                         <actions>
9731                                 <retrieve/>
9732                         </actions>
9733                 </permacrud>
9734         </class>
9735
9736         <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">
9737                 <fields oils_persist:primary="ptype_key">
9738                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9739                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9740                 </fields>
9741                 <links/>
9742                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9743                         <actions>
9744                                 <retrieve/>
9745                         </actions>
9746                 </permacrud>
9747         </class>
9748
9749         <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">
9750                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9751                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9752                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9753                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9754                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9755                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9756                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9757                 </fields>
9758                 <links>
9759                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9760                 </links>
9761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9762                         <actions>
9763                                 <retrieve/>
9764                         </actions>
9765                 </permacrud>
9766         </class>
9767
9768         <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">
9769                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9770                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9771                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9772                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9773                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9774                 </fields>
9775                 <links>
9776                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9777                 </links>
9778                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9779                         <actions>
9780                                 <retrieve/>
9781                         </actions>
9782                 </permacrud>
9783         </class>
9784
9785     <class
9786         id="uvs"
9787         controller="open-ils.cstore open-ils.pcrud"
9788         oils_obj:fieldmapper="url_verify::session"
9789         oils_persist:tablename="url_verify.session"
9790         reporter:label="URL Verification Session"
9791     >
9792         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9793             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9794             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9795                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9796             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9797             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9798             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9799             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9800             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9801             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9802         </fields>
9803
9804         <links>
9805             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9806             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9807             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
9808             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
9809             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
9810         </links>
9811
9812         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9813             <actions>
9814                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
9815             </actions>
9816         </permacrud>
9817
9818     </class>
9819
9820     <class id="uvsbrem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="url_verify::session_biblio_record_entry_map" oils_persist:readonly="true" reporter:label="URL Verify Session Biblio Record Entry Map">
9821         <oils_persist:source_definition>
9822             SELECT
9823                 cbrebi.id AS id,  -- so we can have a pkey in our view
9824                 uvs.id AS session,
9825                 uvs.owning_lib,
9826                 cbrebi.target_biblio_record_entry
9827             FROM url_verify.session uvs
9828             JOIN container.biblio_record_entry_bucket cbreb
9829                 ON (uvs.container = cbreb.id)
9830             JOIN container.biblio_record_entry_bucket_item cbrebi
9831                 ON (cbrebi.bucket = cbreb.id)
9832         </oils_persist:source_definition>
9833         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
9834             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
9835             <field reporter:label="Session" name="session" reporter:datatype="link" />
9836             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9837             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
9838         </fields>
9839         <links>
9840             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
9841             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
9842             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
9843         </links>
9844         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9845             <actions>
9846                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
9847             </actions>
9848         </permacrud>
9849     </class>
9850
9851     <class
9852         id="uvus"
9853         controller="open-ils.cstore open-ils.pcrud"
9854         oils_obj:fieldmapper="url_verify::url_selector"
9855         oils_persist:tablename="url_verify.url_selector"
9856         reporter:label="URL Verification URL Selector"
9857     >
9858         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
9859             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
9860             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
9861                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9862             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
9863         </fields>
9864
9865         <links>
9866             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9867             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
9868         </links>
9869
9870         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9871             <actions>
9872                 <create permission="URL_VERIFY">
9873                     <context link="session" field="owning_lib"/>
9874                 </create>
9875                 <retrieve permission="URL_VERIFY">
9876                     <context link="session" field="owning_lib"/>
9877                 </retrieve>
9878                 <update permission="URL_VERIFY">
9879                     <context link="session" field="owning_lib"/>
9880                 </update>
9881                 <delete permission="URL_VERIFY">
9882                     <context link="session" field="owning_lib"/>
9883                 </delete>
9884             </actions>
9885         </permacrud>
9886
9887     </class>
9888
9889     <class
9890         id="uvu"
9891         controller="open-ils.cstore open-ils.pcrud"
9892         oils_obj:fieldmapper="url_verify::url"
9893         oils_persist:tablename="url_verify.url"
9894         reporter:label="URL Verification URL"
9895     >
9896         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
9897             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
9898                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
9899                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
9900                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9901                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
9902             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9903             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9904             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
9905             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
9906             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
9907             <field reporter:label="Host" name="host" reporter:datatype="text"/>
9908             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
9909             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
9910             <field reporter:label="Path" name="path" reporter:datatype="text"/>
9911             <field reporter:label="Page" name="page" reporter:datatype="text"/>
9912             <field reporter:label="Query" name="query" reporter:datatype="text"/>
9913             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
9914             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
9915         </fields>
9916
9917         <links>
9918             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
9919             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
9920             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9921             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
9922             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
9923         </links>
9924
9925         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9926             <actions>
9927                 <create permission="URL_VERIFY">
9928                     <context link="session" field="owning_lib"/>
9929                 </create>
9930                 <retrieve permission="URL_VERIFY">
9931                     <context link="session" field="owning_lib"/>
9932                 </retrieve>
9933                 <update permission="URL_VERIFY">
9934                     <context link="session" field="owning_lib"/>
9935                 </update>
9936                 <delete permission="URL_VERIFY">
9937                     <context link="session" field="owning_lib"/>
9938                 </delete>
9939             </actions>
9940         </permacrud>
9941
9942     </class>
9943
9944     <class
9945         id="uvva"
9946         controller="open-ils.cstore open-ils.pcrud"
9947         oils_obj:fieldmapper="url_verify::verification_attempt"
9948         oils_persist:tablename="url_verify.verification_attempt"
9949         reporter:label="URL Verification Attempt"
9950     >
9951         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
9952             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
9953                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
9954                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
9955             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
9956             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
9957         </fields>
9958
9959         <links>
9960             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9961             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9962         </links>
9963
9964         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9965             <actions>
9966                 <create permission="URL_VERIFY">
9967                     <context link="session" field="owning_lib"/>
9968                 </create>
9969                 <retrieve permission="URL_VERIFY">
9970                     <context link="session" field="owning_lib"/>
9971                 </retrieve>
9972                 <update permission="URL_VERIFY">
9973                     <context link="session" field="owning_lib"/>
9974                 </update>
9975                 <delete permission="URL_VERIFY">
9976                     <context link="session" field="owning_lib"/>
9977                 </delete>
9978             </actions>
9979         </permacrud>
9980
9981     </class>
9982
9983     <class
9984         id="uvuv"
9985         controller="open-ils.cstore open-ils.pcrud"
9986         oils_obj:fieldmapper="url_verify::url_verification"
9987         oils_persist:tablename="url_verify.url_verification"
9988         reporter:label="URL Verification"
9989     >
9990         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
9991             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
9992                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
9993                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
9994             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
9995             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
9996             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
9997             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
9998                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
9999         </fields>
10000
10001         <links>
10002             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10003             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10004             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10005         </links>
10006
10007         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10008             <actions>
10009                 <create permission="URL_VERIFY">
10010                     <context link="attempt" jump="session" field="owning_lib"/>
10011                 </create>
10012                 <retrieve permission="URL_VERIFY">
10013                     <context link="attempt" jump="session" field="owning_lib"/>
10014                 </retrieve>
10015                 <update permission="URL_VERIFY">
10016                     <context link="attempt" jump="session" field="owning_lib"/>
10017                 </update>
10018                 <delete permission="URL_VERIFY">
10019                     <context link="attempt" jump="session" field="owning_lib"/>
10020                 </delete>
10021             </actions>
10022         </permacrud>
10023
10024     </class>
10025
10026         <class
10027                 id="cfdi"
10028                 controller="open-ils.cstore open-ils.pcrud"
10029                 oils_obj:fieldmapper="config::filter_dialog_interface"
10030                 oils_persist:tablename="config.filter_dialog_interface"
10031                 reporter:label="FilterDialog Interface">
10032                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10033                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10034                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10035                 </fields>
10036                 <links>
10037                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10038                 </links>
10039                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10040                         <actions>
10041                                 <retrieve />
10042                         </actions>
10043                 </permacrud>
10044         </class>
10045
10046         <class
10047                 id="cfdfs"
10048                 controller="open-ils.cstore open-ils.pcrud"
10049                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10050                 oils_persist:tablename="config.filter_dialog_filter_set"
10051                 reporter:label="FilterDialog Filter Set">
10052                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10053                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10054                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10055                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10056                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10057                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10058                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10059                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10060                 </fields>
10061                 <links>
10062                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10063                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10064                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10065                 </links>
10066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10067                         <actions>
10068                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10069                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10070                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10071                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10072                         </actions>
10073                 </permacrud>
10074
10075         </class>
10076
10077         <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">
10078                 <fields oils_persist:primary="code">
10079                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10080                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10081                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10082                 </fields>
10083                 <links/>
10084                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10085                         <actions>
10086                                 <retrieve/>
10087                         </actions>
10088                 </permacrud>
10089         </class>
10090
10091         <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">
10092                 <oils_persist:source_definition>
10093
10094             SELECT  b.id,
10095                     MAX(dcp.edit_date) AS last_delete_date
10096              FROM   biblio.record_entry b
10097                     JOIN asset.call_number cn ON (cn.record = b.id)
10098                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10099              WHERE  NOT b.deleted
10100              GROUP BY b.id
10101              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10102
10103                 </oils_persist:source_definition>
10104                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10105                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10106                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10107                 </fields>
10108                 <links>
10109                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10110                 </links>
10111                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10112                         <actions>
10113                                 <retrieve/>
10114                         </actions>
10115                 </permacrud>
10116         </class>
10117
10118         <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">
10119                 <oils_persist:source_definition>
10120
10121             -- -- 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.
10122             -- -- 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
10123             -- -- may not.
10124             -- SELECT
10125             --     bre.id AS "bib_id",
10126             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
10127             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
10128             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
10129             -- FROM (
10130                 SELECT
10131                     y.bre AS "id",
10132                     COALESCE( x.copy_count, 0 ) AS "copy_count",
10133                     y.hold_count AS "hold_count",
10134                     (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"
10135                 FROM (
10136                         SELECT
10137                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
10138                             COUNT(*) AS "hold_count"
10139                         FROM action.hold_request h
10140                         WHERE
10141                             cancel_time IS NULL
10142                             AND fulfillment_time IS NULL
10143                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10144                         GROUP BY 1
10145                     )y LEFT JOIN (
10146                         SELECT 
10147                             (SELECT id
10148                                 FROM biblio.record_entry 
10149                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
10150                             ) AS "bre", 
10151                             COUNT(*) AS "copy_count"
10152                         FROM asset.copy
10153                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10154                         WHERE copy.holdable 
10155                             AND NOT copy.deleted 
10156                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10157                         GROUP BY 1
10158                     )x ON x.bre = y.bre
10159                 -- )z RIGHT JOIN (
10160                 --     SELECT id
10161                 --     FROM biblio.record_entry
10162                 --     WHERE NOT deleted
10163                 -- )bre ON (z.bib_id = bre.id)
10164                 
10165
10166                 </oils_persist:source_definition>
10167                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10168                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10169                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10170                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10171                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10172                 </fields>
10173                 <links>
10174                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10175                 </links>
10176                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10177                         <actions>
10178                                 <retrieve/>
10179                         </actions>
10180                 </permacrud>
10181         </class>
10182
10183         <class id="rhcrpbap" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib_and_pickup" oils_persist:readonly="true" reporter:label="Hold/Copy Ratio per Bib and Pickup Library">
10184                 <oils_persist:source_definition>
10185             SELECT *,
10186                 CASE WHEN copy_count_at_pickup_library = 0 THEN 'Infinity'::FLOAT ELSE holds_at_pickup_library::FLOAT/copy_count_at_pickup_library END AS pickup_library_ratio,
10187                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10188             FROM
10189                 (SELECT bib_record as id, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
10190                     FROM
10191                         action.hold_request ahr
10192                         JOIN reporter.hold_request_record rhrr USING (id)
10193                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10194                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10195                     WHERE
10196                         ahr.cancel_time IS NULL
10197                         AND ahr.fulfillment_time IS NULL
10198                     GROUP BY bib_record, pickup_lib
10199                 )x
10200                 JOIN
10201                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10202                     FROM
10203                         action.hold_request ahr
10204                         JOIN reporter.hold_request_record rhrr USING (id)
10205                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10206                     WHERE
10207                         ahr.cancel_time IS NULL
10208                         AND ahr.fulfillment_time IS NULL
10209                     GROUP BY bib_record
10210                 )y
10211                 USING (id)
10212                 </oils_persist:source_definition>
10213                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10214                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10215                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10216                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10217                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10218                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10219                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10220                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10221                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10222                 </fields>
10223                 <links>
10224                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10225                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10226                 </links>
10227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10228                         <actions>
10229                                 <retrieve/>
10230                         </actions>
10231                 </permacrud>
10232         </class>
10233
10234         <class id="rlc" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_circ_date" oils_persist:readonly="true" reporter:label="Last Circulation or Creation Date">
10235                 <oils_persist:source_definition>
10236             SELECT
10237                 ac.id,
10238                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10239                 MAX(actac.xact_start) AS last_circ
10240             FROM asset.copy ac
10241                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10242             GROUP BY ac.id
10243
10244             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10245             --SELECT
10246             --    ac.id,
10247             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10248             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10249             --FROM asset.copy ac
10250             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10251             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10252             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10253                 </oils_persist:source_definition>
10254                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10255                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10256                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10257                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10258                 </fields>
10259                 <links>
10260                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10261                 </links>
10262                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10263                         <actions>
10264                                 <retrieve/>
10265                         </actions>
10266                 </permacrud>
10267         </class>
10268
10269         <class id="ctcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::ts_config_list" oils_persist:tablename="config.ts_config_list" reporter:label="Text Search Configs">
10270                 <fields oils_persist:primary="id">
10271                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10272                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10273                 </fields>
10274                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10275                         <actions>
10276                                 <retrieve/>
10277                         </actions>
10278                 </permacrud>
10279         </class>
10280
10281         <class id="cmcts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class_ts_map" oils_persist:tablename="config.metabib_class_ts_map" reporter:label="Metabib Class TS Map">
10282                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10283                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10284                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10285                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10286                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10287                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10288                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10289                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10290                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10291                 </fields>
10292                 <links>
10293                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10294                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10295                 </links>
10296                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10297                         <actions>
10298                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10299                                 <retrieve/>
10300                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10301                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10302                         </actions>
10303                 </permacrud>
10304         </class>
10305
10306         <class id="cmfts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_ts_map" oils_persist:tablename="config.metabib_field_ts_map" reporter:label="Metabib Field TS Map">
10307                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10308                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10309                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10310                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10311                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10312                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10313                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10314                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10315                 </fields>
10316                 <links>
10317                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10318                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10319                 </links>
10320                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10321                         <actions>
10322                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10323                                 <retrieve/>
10324                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10325                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10326                         </actions>
10327                 </permacrud>
10328         </class>
10329
10330
10331         <!-- ********************************************************************************************************************* -->
10332         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10333         <!-- ********************************************************************************************************************* -->
10334         <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">
10335                 <fields oils_persist:primary="id">
10336                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10337                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10338                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10339                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10340                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10341                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10342                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10343                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10344                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10345                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10346                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10347                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10348                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10349                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10350                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10351                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10352                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10353                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10354                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10355                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10356                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10357                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10358                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10359                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10360                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10361                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10362                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10363                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10364                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10365                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10366                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10367                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10368                 </fields>
10369                 <links>
10370                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10371                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10372                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10373                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10374                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10375                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10376                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10377                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10378                 </links>
10379         </class>
10380
10381         <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">
10382                 <fields oils_persist:primary="id">
10383                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10384                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10385                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10386                 </fields>
10387                 <links>
10388                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10389                 </links>
10390         </class>
10391
10392         <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">
10393                 <fields oils_persist:primary="id">
10394                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10395                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10396                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10397                 </fields>
10398                 <links>
10399                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10400                 </links>
10401         </class>
10402
10403         <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">
10404                 <fields oils_persist:primary="id">
10405                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10406
10407                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10408                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10409                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10410
10411                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10412                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10413                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10414
10415                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10416                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10417
10418                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10419                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10420                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10421
10422                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10423                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10424
10425                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10426                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10427                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10428
10429                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10430                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10431                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10432
10433                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10434                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10435                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10436                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10437
10438                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10439                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10440
10441                 </fields>
10442                 <links>
10443                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10444                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10445                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10446                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10447                 </links>
10448         </class>
10449
10450         <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">
10451                 <oils_persist:source_definition>
10452
10453             SELECT
10454                 po.ordering_agency AS ordering_agency,
10455                 po.id AS purchase_order,
10456                 li.id AS lineitem,
10457                 lid.id AS lineitem_detail,
10458                 cpa.id AS claim_policy_action
10459             FROM
10460                 acq.lineitem_detail lid
10461                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10462                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10463                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10464                 JOIN acq.claim_policy_action cpa ON (
10465                     cpa.claim_policy = cp.id
10466
10467                     -- we only care about claim policy actions whose claim
10468                     -- interval we'd reached or exceeded
10469                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10470
10471                     -- filter out all claim policy actions where claim events
10472                     -- have occurred on or after the action's action_interval
10473                     AND NOT EXISTS (
10474                         SELECT 1
10475                         FROM
10476                             acq.claim_event evt
10477                             JOIN acq.claim claim ON (
10478                                 claim.id = evt.claim
10479                                 AND claim.lineitem_detail = lid.id
10480                             )
10481                         WHERE
10482                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10483                     )
10484                 )
10485             WHERE
10486                 lid.cancel_reason IS NULL
10487                 AND li.cancel_reason IS NULL -- belt/suspenders
10488                 AND po.cancel_reason IS NULL -- belt/suspenders
10489                 AND lid.recv_time IS NULL
10490                 AND po.state = 'on-order'
10491             ORDER BY 1, 2, 3, 4, 5
10492
10493                 </oils_persist:source_definition>
10494                 <fields>
10495                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10496                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10497                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10498                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10499                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10500                 </fields>
10501                 <links>
10502                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10503                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10504                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10505                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10506                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10507                 </links>
10508         </class>
10509         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary" oils_persist:tablename="acq.lineitem_summary">
10510                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10511                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10512                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10513                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10514                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10515                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10516                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10517                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10518                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10519                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10520                 </fields>
10521                 <links>
10522                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10523                 </links>
10524     </class>
10525         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10526                 <oils_persist:source_definition>
10527             SELECT * FROM acq.lineitem_summary 
10528                                 WHERE item_count > (invoice_count + cancel_count)
10529         </oils_persist:source_definition>
10530                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10531                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10532                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10533                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10534                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10535                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10536                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10537                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10538                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10539                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10540                 </fields>
10541                 <links>
10542                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10543                 </links>
10544     </class>
10545         <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">
10546                 <oils_persist:source_definition>
10547
10548                         SELECT  t.*
10549                           FROM  action.transit_copy t
10550                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10551                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10552                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10553
10554                 </oils_persist:source_definition>
10555                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10556                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10557                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10558                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10559                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10560                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10561                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10562                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10563                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10564                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10565                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10566                 </fields>
10567                 <links>
10568                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10569                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10570                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10571                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10572                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10573                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10574                 </links>
10575         </class>
10576
10577     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10578                 <oils_persist:source_definition>
10579
10580         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10581                 SELECT
10582                         cp.id as copy,
10583                         COUNT(circ.id),
10584                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10585                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10586                 FROM
10587                         asset.copy cp
10588                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10589                 GROUP BY 1, 3, 4
10590                 UNION ALL
10591                 SELECT
10592                         cp.id as copy,
10593                         COUNT(circ.id),
10594                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10595                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10596                 FROM
10597                         asset.copy cp
10598                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10599                 GROUP BY 1, 3, 4
10600                 UNION ALL
10601                 SELECT
10602                         id as copy,
10603                         circ_count,
10604                         -1 AS year,
10605                         false as is_renewal
10606                 FROM
10607                         extend_reporter.legacy_circ_count
10608         )x GROUP BY 1, 3, 4
10609
10610                 </oils_persist:source_definition>
10611         <fields>
10612             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10613             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10614             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10615             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10616         </fields>
10617                 <links>
10618                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10619                 </links>
10620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10621                         <actions>
10622                                 <retrieve/>
10623                         </actions>
10624                 </permacrud>
10625     </class>
10626
10627         <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">
10628                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10629                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10630                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10631                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10632                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10633                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10634                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10635                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10636                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10637                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10638                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10639                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10640                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10641                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10642                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10643                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10644                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10645                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10646                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10647                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10648                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10649                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10650                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10651                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10652                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
10653                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10654                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10655                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10656                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10657                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10658                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10659                 </fields>
10660                 <links>
10661                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10662                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10663                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10664                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10665                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10666                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10667                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10668                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10669                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10670                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10671                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10672                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10673                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10674                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10675                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10676                 </links>
10677         </class>
10678
10679     <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">
10680         <fields oils_persist:primary="id">
10681             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10682             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10683             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
10684             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10685             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10686             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10687             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10688             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10689             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10690             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10691             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10692             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10693             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
10694             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
10695             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10696             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10697             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10698             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10699             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10700             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10701             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10702             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10703             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10704             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10705             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10706             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10707             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10708             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10709             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10710             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10711             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10712             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10713             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10714             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10715         </fields>
10716         <links>
10717             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10718             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10719             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10720             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10721             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10722         </links>
10723     </class>
10724
10725     <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">
10726         <fields oils_persist:primary="id">
10727             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10728             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10729             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10730             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10731         </fields>
10732         <links>
10733             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10734             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10735         </links>
10736     </class>
10737
10738     <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">
10739         <fields oils_persist:primary="owning_lib">
10740             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10741             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10742             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10743         </fields>
10744         <links>
10745             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10746         </links>
10747     </class>
10748
10749     <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">
10750         <fields oils_persist:primary="id">
10751             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10752             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10753             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10754             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10755             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10756         </fields>
10757         <links>
10758             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10759             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10760             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10761         </links>
10762     </class>
10763
10764     <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">
10765         <fields oils_persist:primary="circ_lib">
10766             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10767             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10768             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10769             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10770         </fields>
10771         <links>
10772             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10773             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10774         </links>
10775     </class>
10776
10777     <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">
10778         <fields oils_persist:primary="id">
10779             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10780             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10781             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10782             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10783             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10784         </fields>
10785         <links>
10786             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10787             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10788             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10789         </links>
10790     </class>
10791
10792     <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">
10793         <fields oils_persist:primary="home_ou">
10794             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10795             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10796             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10797             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10798         </fields>
10799         <links>
10800             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10801             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10802         </links>
10803     </class>
10804         <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">
10805                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
10806                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
10807                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
10808                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
10809                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
10810                 </fields>
10811                 <links>
10812                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10813                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
10814                 </links>
10815                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10816                         <actions>
10817                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10818                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
10819                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10820                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10821                         </actions>
10822                 </permacrud>
10823         </class>
10824         <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">
10825                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10826                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10827                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10828                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10829                 </fields>
10830                 <links>
10831                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10832                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10833                         </links>
10834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10835                 <actions>
10836                                 <create permission="ADMIN_ACQ_FUND_TAG">
10837                                         <context link="tag" field="owner"/>
10838                                 </create>
10839                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10840                                         <context link="tag" field="owner"/>
10841                                 </retrieve>
10842                                 <update permission="ADMIN_ACQ_FUND_TAG">
10843                                         <context link="tag" field="owner"/>
10844                                 </update>
10845                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10846                                         <context link="tag" field="owner"/>
10847                                 </delete>
10848                         </actions>
10849                 </permacrud>
10850         </class>
10851         <class id="acqmapinv" controller="open-ils.cstore" oils_obj:fieldmapper="acq::map_to_invoice" reporter:label="Acq Map to Invoice View" oils_persist:readonly="true">
10852                 <oils_persist:source_definition><![CDATA[
10853                 SELECT
10854                         poi.purchase_order AS purchase_order,
10855                         ii.invoice AS invoice,
10856                         NULL AS lineitem,
10857                         poi.id AS po_item,
10858                         NULL AS picklist
10859                 FROM
10860                         acq.po_item poi
10861                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10862                 UNION SELECT
10863                         jub.purchase_order AS purchase_order,
10864                         ie.invoice AS invoice,
10865                         jub.id AS lineitem,
10866                         NULL AS po_item,
10867                         jub.picklist AS picklist
10868                 FROM
10869                         acq.lineitem jub
10870                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10871                 UNION SELECT
10872                         ii.purchase_order AS purchase_order,
10873                         ii.invoice AS invoice,
10874                         NULL AS lineitem,
10875                         NULL AS po_item,
10876                         NULL AS picklist
10877                 FROM
10878                         acq.invoice_item ii
10879                 WHERE ii.po_item IS NULL
10880                 UNION SELECT
10881                         ie.purchase_order AS purchase_order,
10882                         ie.invoice AS invoice,
10883                         NULL AS lineitem,
10884                         NULL AS po_item,
10885                         NULL AS picklist
10886                 FROM
10887                         acq.invoice_entry ie
10888                 WHERE ie.lineitem IS NULL
10889                 UNION SELECT
10890                         NULL AS purchase_order,
10891                         NULL AS invoice,
10892                         jub.id AS lineitem,
10893                         NULL AS po_item,
10894                         jub.picklist AS picklist
10895                 FROM
10896                         acq.lineitem jub
10897                 WHERE jub.purchase_order IS NULL
10898                 ]]></oils_persist:source_definition>
10899                 <fields>
10900                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10901                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10902                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10903                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10904                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10905                 </fields>
10906                 <links>
10907                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10908                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10909                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10910                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10911                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10912                 </links>
10913         </class>
10914         <class id="cbc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::barcode_completion" oils_persist:tablename="config.barcode_completion" reporter:label="Barcode Completions">
10915                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10916                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10917                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10918                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10919                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10920                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10921                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10922                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10923                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10924                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10925                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10926                 </fields>
10927                 <links>
10928                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10929                 </links>
10930                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10931                         <actions>
10932                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10933                                 <retrieve/>
10934                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10935                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10936                         </actions>
10937                 </permacrud>
10938         </class>
10939
10940         <class id="coustl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type_log" oils_persist:tablename="config.org_unit_setting_type_log" reporter:label="Organizational Unit Setting Type Log">
10941                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10942                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10943                         <field name="date_applied" reporter:datatype="timestamp"/>
10944                         <field name="org" reporter:datatype="org_unit"/>
10945                         <field name="original_value" reporter:datatype="text"/>
10946                         <field name="new_value" reporter:datatype="text"/>
10947                         <field name="field_name" reporter:datatype="link"/>
10948                 </fields>
10949                 <links>
10950                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10951                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10952                 </links>
10953                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10954                         <actions>
10955                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10956                                 <retrieve/>
10957                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10958                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10959                         </actions>
10960                 </permacrud>
10961         </class>
10962         <class id="aaactsc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_actor_stat_cat" oils_persist:tablename="action.archive_actor_stat_cat" reporter:label="Circ-Archived Patron Statistical Category Entries">
10963                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10964                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10965                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10966                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10967                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10968                 </fields>
10969                 <links>
10970                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10971                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10972                 </links>
10973         </class>
10974         <class id="aaasc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_asset_stat_cat" oils_persist:tablename="action.archive_asset_stat_cat" reporter:label="Circ-Archived Copy Statistical Category Entries">
10975                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10976                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10977                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10978                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10979                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10980                 </fields>
10981                 <links>
10982                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10983                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10984                 </links>
10985         </class>
10986         <class id="cfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group" oils_persist:tablename="config.floating_group" reporter:label="Floating Group">
10987                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
10988                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10989                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10990                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
10991                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
10992                 </fields>
10993                 <links>
10994                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
10995                 </links>
10996                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10997                         <actions>
10998                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
10999                                 <retrieve/>
11000                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11001                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11002                         </actions>
11003                 </permacrud>
11004         </class>
11005         <class id="cfgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group_member" oils_persist:tablename="config.floating_group_member" reporter:label="Floating Group Members">
11006                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11007                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11008                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11009                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11010                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11011                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11012                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11013                 </fields>
11014                 <links>
11015                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11016                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11017                 </links>
11018                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11019                         <actions>
11020                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11021                                 <retrieve/>
11022                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11023                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11024                         </actions>
11025                 </permacrud>
11026         </class>
11027
11028         <!-- ********************************************************************************************************************* -->
11029
11030 </IDL>
11031
11032 <!--
11033     vim:noet:ts=4:sw=4:
11034 -->