]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
e86ee9cad3d93b2389cde15d063b02344fc49498
[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="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2356                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2357                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2358                 </fields>
2359                 <links>
2360                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2361                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2362                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2363                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2364                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2365                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2366                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2367                 </links>
2368                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2369                         <actions>
2370                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2371                                 <retrieve/>
2372                                 <update permission="UPDATE_MARC" global_required="true"/>
2373                                 <delete permission="UPDATE_MARC" global_required="true"/>
2374                         </actions>
2375                 </permacrud>
2376         </class>
2377         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2378                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2379                         <field name="char_encoding" />
2380                         <field name="id" />
2381                         <field name="record" />
2382                         <field name="record_status" />
2383                         <field name="thesaurus" />
2384                 </fields>
2385                 <links>
2386                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2387                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2388                 </links>
2389         </class>
2390         <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">
2391                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2392                         <field name="id" reporter:datatype="id" />
2393                         <field name="bib" reporter:datatype="link" />
2394                         <field name="authority" reporter:datatype="link" />
2395                 </fields>
2396                 <links>
2397                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2398                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2399                 </links>
2400         </class>
2401         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2402                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2403                         <field name="id" reporter:datatype="id" />
2404                         <field name="record" reporter:datatype="link" />
2405                         <field name="atag" reporter:datatype="link" />
2406                         <field name="value" reporter:datatype="text" />
2407                 </fields>
2408                 <links>
2409                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2410                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2411                 </links>
2412         </class>
2413         <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">
2414                 <fields oils_persist:primary="code" oils_persist:sequence="">
2415                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2416                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2417                 </fields>
2418                 <links/>
2419         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2420             <actions>
2421                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2422                 <retrieve/>
2423                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2424                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2425             </actions>
2426         </permacrud>
2427         </class>
2428         <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">
2429                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2430                         <field name="accepting_usr" />
2431                         <field name="amount" reporter:datatype="money" />
2432                         <field name="amount_collected" reporter:datatype="money" />
2433                         <field name="approval_code" reporter:datatype="text"/>
2434                         <field name="cash_drawer" reporter:datatype="link"/>
2435                         <field name="cc_first_name" reporter:datatype="text"/>
2436                         <field name="cc_last_name" reporter:datatype="text"/>
2437                         <field name="cc_number" reporter:datatype="text"/>
2438                         <field name="cc_order_number" reporter:datatype="text"/>
2439                         <field name="cc_type" reporter:datatype="text"/>
2440                         <field name="cc_processor" reporter:datatype="text"/>
2441                         <field name="expire_month" reporter:datatype="int" />
2442                         <field name="expire_year" reporter:datatype="int" />
2443                         <field name="id" reporter:datatype="id" />
2444                         <field name="note" reporter:datatype="text"/>
2445                         <field name="payment_ts" reporter:datatype="timestamp"/>
2446                         <field name="xact" reporter:datatype="link"/>
2447                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2448                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2449                 </fields>
2450                 <links>
2451                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2452                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2453                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2454                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2455                 </links>
2456         </class>
2457         <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">
2458                 <fields oils_persist:primary="name">
2459                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2460                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2461                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2462                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2463                 </fields>
2464                 <links/>
2465         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2466             <actions>
2467                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2468                 <retrieve/>
2469                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2470                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2471             </actions>
2472         </permacrud>
2473         </class>
2474
2475         <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">
2476                 <fields oils_persist:primary="alias">
2477                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2478                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2479                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2480                 </fields>
2481                 <links>
2482                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2483                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2484                 </links>
2485         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2486             <actions>
2487                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2488                 <retrieve/>
2489                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2490                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2491             </actions>
2492         </permacrud>
2493         </class>
2494
2495         <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">
2496                 <fields oils_persist:primary="name">
2497                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2498                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2499                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2500                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2501                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2502                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2503                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2504                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2505                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2506                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2507                 </fields>
2508                 <links>
2509                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2510                 </links>
2511         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2512             <actions>
2513                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2514                 <retrieve/>
2515                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2516                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2517             </actions>
2518         </permacrud>
2519         </class>
2520
2521         <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">
2522                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2523                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2524                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2525                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2526                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2527                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2528                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2529                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2530                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2531                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2532                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2533                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2534                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2535                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2536                 </fields>
2537                 <links>
2538                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2539                 </links>
2540         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2541             <actions>
2542                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2543                 <retrieve/>
2544                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2545                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2546             </actions>
2547         </permacrud>
2548         </class>
2549         <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">
2550                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2551                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2552                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2553                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2554                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2555                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2556                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2557                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2558                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2559                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2560                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2561                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2562                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2563                 </fields>
2564                 <links>
2565                 </links>
2566                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2567                         <actions>
2568                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2569                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2570                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2571                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2572                         </actions>
2573                 </permacrud>
2574         </class>
2575         <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">
2576                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2577                         <field name="id" reporter:datatype="id" />
2578                         <field name="name" reporter:datatype="text"/>
2579                         <field name="xpath" reporter:datatype="text"/>
2580                         <field name="format" reporter:datatype="link"/>
2581                         <field name="first_word" reporter:datatype="bool" />
2582                 </fields>
2583                 <links/>
2584         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2585             <actions>
2586                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2587                 <retrieve/>
2588                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2589                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2590             </actions>
2591         </permacrud>
2592         </class>
2593         <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">
2594                 <fields oils_persist:primary="code" oils_persist:sequence="">
2595                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2596                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2597                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2598                 </fields>
2599                 <links/>
2600         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2601             <actions>
2602                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2603                 <retrieve/>
2604                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2605                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2606             </actions>
2607         </permacrud>
2608         </class>
2609         <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">
2610                 <fields oils_persist:primary="code" oils_persist:sequence="">
2611                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2612                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2613                 </fields>
2614                 <links/>
2615         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2616             <actions>
2617                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2618                 <retrieve/>
2619                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2620                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2621             </actions>
2622         </permacrud>
2623         </class>
2624     <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">
2625         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2626             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2627             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2628             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2629             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2630         </fields>
2631         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2632             <actions>
2633                 <retrieve/>
2634             </actions>
2635         </permacrud>
2636     </class>
2637         <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">
2638                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2639                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2640                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2641                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2642                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2643                 </fields>
2644                 <links>
2645                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2646                 </links>
2647         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2648             <actions>
2649                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2650                 <retrieve/>
2651                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2652                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2653             </actions>
2654         </permacrud>
2655         </class>
2656         <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">
2657                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2658                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2659                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2660                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2661                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2662                 </fields>
2663                 <links>
2664                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2665                 </links>
2666         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2667             <actions>
2668                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2669                 <retrieve/>
2670                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2671                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2672             </actions>
2673         </permacrud>
2674         </class>
2675         <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">
2676                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2677                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2678                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2679                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2680                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2681                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2682                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2683                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2684                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2685                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2686                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2687                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2688                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2689                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2690                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2691                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2692                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2693                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2694                 </fields>
2695                 <links>
2696                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2697                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2698                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2699                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2700                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2701                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2702                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2703                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2704                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2705                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2706                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2707                 </links>
2708         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2709             <actions>
2710                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2711                 <retrieve/>
2712                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2713                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2714             </actions>
2715         </permacrud>
2716         </class>
2717         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2718                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2719                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2720                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2721                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2722                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2723                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2724                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2725                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2726                 </fields>
2727                 <links>
2728                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2729                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2730         </links>
2731         </class>
2732         <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">
2733                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2734                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2735                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2736                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2737                 </fields>
2738                 <links>
2739                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2740                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2741                 </links>
2742         </class>
2743         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2744                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2745                         <field name="id" reporter:datatype="id" />
2746                         <field name="value" oils_persist:i18n="true" />
2747                 </fields>
2748                 <links/>
2749         </class>
2750         <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">
2751                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2752                         <field name="balance_owed" reporter:datatype="money" />
2753                         <field name="total_owed" reporter:datatype="money" />
2754                         <field name="total_paid" reporter:datatype="money" />
2755                         <field name="usr" reporter:datatype="link"/>
2756                 </fields>
2757                 <links>
2758                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2759         </links>
2760         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2761             <actions>
2762                 <retrieve permission="VIEW_USER">
2763                     <context link="usr" field="home_ou"/>
2764                 </retrieve>
2765             </actions>
2766         </permacrud>
2767         </class>
2768         <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">
2769                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2770                         <field name="collector" />
2771                         <field name="enter_time" reporter:datatype="timestamp"/>
2772                         <field name="id" reporter:datatype="id" />
2773                         <field name="location" reporter:datatype="link"/>
2774                         <field name="usr" reporter:datatype="link"/>
2775                 </fields>
2776                 <links>
2777                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2778                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2779                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2780                 </links>
2781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2782             <actions>
2783                 <create permission="money.collections_tracker.create" context_field="location"/>
2784                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2785                 <delete permission="money.collections_tracker.create" context_field="location"/>
2786             </actions>
2787         </permacrud>
2788         </class>
2789         <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">
2790                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2791                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2792                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2793                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2794                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2795                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2796                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2797                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2798                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2799                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2800                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2801                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2802                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2803                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2804                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2805                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2806                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2807                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2808                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2809                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2810                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2811                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2812                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2813                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2814                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2815                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2816                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2817                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2818                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2819                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2820                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2821                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2822                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2823                 </fields>
2824                 <links>
2825                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2826                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2827                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2828                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2829                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2830                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2831                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2832                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2833                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2834                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2835                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2836                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2837                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2838                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2839                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2840                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2841                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2842                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2843                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2844                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2845                 </links>
2846         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2847             <actions>
2848                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2849                 <retrieve/>
2850                 <update permission="UPDATE_MARC" global_required="true"/>
2851             </actions>
2852         </permacrud>
2853         </class>
2854         <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">
2855                 <fields oils_persist:primary="id">
2856                         <field name="dow_0_close" />
2857                         <field name="dow_0_open" />
2858                         <field name="dow_1_close" />
2859                         <field name="dow_1_open" />
2860                         <field name="dow_2_close" />
2861                         <field name="dow_2_open" />
2862                         <field name="dow_3_close" />
2863                         <field name="dow_3_open" />
2864                         <field name="dow_4_close" />
2865                         <field name="dow_4_open" />
2866                         <field name="dow_5_close" />
2867                         <field name="dow_5_open" />
2868                         <field name="dow_6_close" />
2869                         <field name="dow_6_open" />
2870                         <field name="id" reporter:datatype="id" />
2871                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2872                 </fields>
2873                 <links>
2874                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2875                 </links>
2876         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2877             <actions>
2878                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2879                 <retrieve/>
2880                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2881                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2882             </actions>
2883         </permacrud>
2884         </class>
2885         <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">
2886                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2887                         <field name="id" reporter:datatype="id" />
2888                         <field name="record" reporter:datatype="link"/>
2889                         <field name="label" reporter:datatype="text"/>
2890                         <field name="label_sortkey" reporter:datatype="text"/>
2891                 </fields>
2892                 <links>
2893                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2894                 </links>
2895         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2896             <actions>
2897                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2898                 <retrieve/>
2899                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2900                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2901             </actions>
2902         </permacrud>
2903         </class>
2904         <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">
2905                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2906                         <field name="id" reporter:datatype="id" />
2907                         <field name="target_copy" reporter:datatype="link" />
2908                         <field name="part" reporter:datatype="link"/>
2909                 </fields>
2910                 <links>
2911                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2912                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2913                 </links>
2914         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2915             <actions>
2916                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2917                 <retrieve/>
2918                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2919                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2920             </actions>
2921         </permacrud>
2922         </class>
2923         <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">
2924                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2925                         <field name="close_end" reporter:datatype="timestamp" />
2926                         <field name="close_start" reporter:datatype="timestamp" />
2927                         <field name="id" reporter:datatype="id" />
2928                         <field name="org_unit" reporter:datatype="org_unit"/>
2929                         <field name="reason" reporter:datatype="text"/>
2930                 </fields>
2931                 <links>
2932                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2933                 </links>
2934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2935             <actions>
2936                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2937                 <retrieve/>
2938                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2939                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2940             </actions>
2941         </permacrud>
2942         </class>
2943         <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">
2944                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2945                         <field name="extended" reporter:datatype="interval"/>
2946                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2947                         <field name="max_renewals" reporter:datatype="int" />
2948                         <field name="name" reporter:datatype="text"/>
2949                         <field name="normal" reporter:datatype="interval"/>
2950                         <field name="shrt" reporter:datatype="interval"/>
2951                 </fields>
2952                 <links>
2953                 </links>
2954         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2955             <actions>
2956                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2957                 <retrieve/>
2958                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2959                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2960             </actions>
2961         </permacrud>
2962         </class>
2963
2964         <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">
2965                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2966                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2967                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2968             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2969                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2970             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2971                 </fields>
2972                 <links>
2973             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2974                 </links>
2975                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2976             <actions>
2977                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2978                 <retrieve/>
2979                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2980                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2981             </actions>
2982                 </permacrud>
2983         </class>
2984
2985         <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">
2986                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2987                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2988                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2989                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2990             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2991                 </fields>
2992                 <links>
2993                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2994                 </links>
2995                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2996             <actions>
2997                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2998                 <retrieve/>
2999                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3000                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3001             </actions>
3002                 </permacrud>
3003         </class>
3004
3005         <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">
3006                 <fields oils_persist:primary="id" oils_persist:sequence="">
3007                         <field name="balance_owed" reporter:datatype="money"/>
3008                         <field name="id" reporter:datatype="id" />
3009                         <field name="last_billing_note" reporter:datatype="text"/>
3010                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3011                         <field name="last_billing_type" reporter:datatype="text"/>
3012                         <field name="last_payment_note" reporter:datatype="text"/>
3013                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3014                         <field name="last_payment_type" reporter:datatype="text"/>
3015                         <field name="total_owed" reporter:datatype="money"/>
3016                         <field name="total_paid" reporter:datatype="money"/>
3017                         <field name="usr" reporter:datatype="link"/>
3018                         <field name="xact_finish" reporter:datatype="timestamp" />
3019                         <field name="xact_start" reporter:datatype="timestamp" />
3020                         <field name="xact_type" reporter:datatype="text"/>
3021                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3022                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3023                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3024                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3025                         <field name="billing_location" reporter:datatype="link"/>
3026                 </fields>
3027                 <links>
3028                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3029                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3030                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3031                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3032                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3033                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3034                 </links>
3035         </class>
3036         <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">
3037                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3038                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3039                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3040                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3041                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3042                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3043                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3044                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3045                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3046                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3047                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3048                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3049                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3050                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3051                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3052                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3053                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3054                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3055                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3056                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3057                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3058                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3059                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3060                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3061                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3062                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3063                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3064                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3065                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3066                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3067                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3068                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3069                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3070                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3071                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3072                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3073                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3074                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3075                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3076                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3077                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3078                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3079                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3080                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3081                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3082                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3083                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3084                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3085                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3086                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3087                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3088                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3089                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3090                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3091                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3092                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3093                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3094                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3095                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3096                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3097                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3098                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3099                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3100                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3101                 </fields>
3102                 <links>
3103                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3104                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3105                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3106                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3107                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3108                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3109                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3110                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3111                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3112                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3113                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3114                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3115                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3116                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3117                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3118                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3119                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3120                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3121                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3122                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3123                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3124                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3125                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3126                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3127                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3128                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3129                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3130                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3131                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3132                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3133                 </links>
3134                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3135                         <actions>
3136                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3137                         </actions>
3138                 </permacrud>
3139         </class>
3140         <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">
3141                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3142                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3143                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3144                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3145                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3146                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3147                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3148                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3149                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3150         </fields>
3151                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3152                         <actions>
3153                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3154                                 <retrieve/>
3155                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3156                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3157                         </actions>
3158                 </permacrud>
3159         </class>
3160         <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">
3161                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3162                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3163                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3164                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3165                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3166         </fields>
3167         <links>
3168                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3169                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3170                 </links>
3171                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3172                         <actions>
3173                                 <retrieve permission="RUN_REPORTS">
3174                                         <context link="usr" field="home_ou" />
3175                                 </retrieve>
3176                         </actions>
3177                 </permacrud>
3178         </class>
3179         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3180                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3181                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3182                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3183                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3184                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3185                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3186                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3187         </fields>
3188         <links>
3189                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3190                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3191                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3192                 </links>
3193                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3194                         <actions>
3195                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3196                                         <context link="usr" field="home_ou" />
3197                                         <context link="ws" field="owning_lib" />
3198                                 </retrieve>
3199                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3200                                         <context link="usr" field="home_ou" />
3201                                         <context link="ws" field="owning_lib" />
3202                                 </create>
3203                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3204                                         <context link="usr" field="home_ou" />
3205                                         <context link="ws" field="owning_lib" />
3206                                 </update>
3207                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3208                                         <context link="usr" field="home_ou" />
3209                                         <context link="ws" field="owning_lib" />
3210                                 </delete>
3211                         </actions>
3212                 </permacrud>
3213         </class>
3214         <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">
3215                 <fields oils_persist:primary="name">
3216                         <field name="name" reporter:datatype="text"/>
3217                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3218                 </fields>
3219                 <links/>
3220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3221                         <actions>
3222                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3223                                 <retrieve/>
3224                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3225                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3226                         </actions>
3227                 </permacrud>
3228         </class>
3229         <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">
3230                 <fields oils_persist:primary="name">
3231                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3232                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3233                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3234                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3235                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3236                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3237                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3238                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3239                 </fields>
3240                 <links>
3241                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3242                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3243                 </links>
3244                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3245                         <actions>
3246                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3247                                 <retrieve/>
3248                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3249                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3250                         </actions>
3251                 </permacrud>
3252         </class>
3253         <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">
3254                 <fields oils_persist:primary="name">
3255                         <field name="name" reporter:datatype="text"/>
3256                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3257                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3258                         <field name="datatype" reporter:datatype="text"/>
3259                         <field name="view_perm" reporter:datatype="link"/>
3260                         <field name="update_perm" reporter:datatype="link"/>
3261                         <field name="fm_class" reporter:datatype="text"/>
3262                         <field name="grp" reporter:datatype="link"/>
3263                 </fields>
3264                 <links>
3265                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3266                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3267                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3268                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3269                 </links>
3270                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3271                         <actions>
3272                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3273                                 <retrieve/>
3274                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3275                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3276                         </actions>
3277                 </permacrud>
3278         </class>
3279         <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">
3280                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3281                         <field name="id" />
3282                         <field name="name"  reporter:datatype="text"/>
3283                         <field name="org_unit" reporter:datatype="org_unit"/>
3284                         <field name="value"  reporter:datatype="text"/>
3285                 </fields>
3286                 <links>
3287                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3288                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3289                 </links>
3290         </class>
3291         <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">
3292                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3293                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3294                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3295                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3296                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3297                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3298                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3299                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3300                 </fields>
3301                 <links>
3302                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3303                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3304                 </links>
3305         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3306             <actions>
3307                 <create permission="CREATE_COPY_NOTE">
3308                     <context link="owning_copy" field="circ_lib"/>
3309                 </create>
3310                 <retrieve permission="VIEW_COPY_NOTES">
3311                     <context link="owning_copy" field="circ_lib"/>
3312                 </retrieve>
3313                 <update permission="UPDATE_COPY_NOTE">
3314                     <context link="owning_copy" field="circ_lib"/>
3315                 </update>
3316                 <delete permission="DELETE_COPY_NOTE">
3317                     <context link="owning_copy" field="circ_lib"/>
3318                 </delete>
3319             </actions>
3320         </permacrud>
3321         </class>
3322         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3323                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3324                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3325                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3326                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3327                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3328                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3329                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3330                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3331                 </fields>
3332                 <links>
3333                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3334                 </links>
3335         </class>
3336         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3337                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3338                         <field name="fingerprint"  reporter:datatype="text"/>
3339                         <field name="id" reporter:datatype="id" />
3340                         <field name="master_record" reporter:datatype="link"/>
3341                         <field name="mods"  reporter:datatype="text"/>
3342                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3343                 </fields>
3344                 <links>
3345                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3346                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3347                 </links>
3348         </class>
3349         <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">
3350                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3351                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3352                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3353                 </fields>
3354                 <links/>
3355         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3356             <actions>
3357                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3358                 <retrieve/>
3359                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3360                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3361             </actions>
3362         </permacrud>
3363         </class>
3364         <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">
3365                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3366                         <field name="code"  reporter:datatype="text"/>
3367                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3368                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3369                 </fields>
3370                 <links/>
3371         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3372             <actions>
3373                 <create permission="CREATE_PERM" global_required="true"/>
3374                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3375                 <update permission="UPDATE_PERM" global_required="true"/>
3376                 <delete permission="DELETE_PERM" global_required="true"/>
3377             </actions>
3378         </permacrud>
3379         </class>
3380         <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">
3381                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3382                         <field name="id" reporter:datatype="id" />
3383                         <field name="metarecord" reporter:datatype="link"/>
3384                         <field name="source" reporter:datatype="link"/>
3385                 </fields>
3386                 <links>
3387                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3388                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3389                 </links>
3390         </class>
3391         <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">
3392                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3393                         <field name="id" reporter:datatype="id" />
3394                         <field name="field" reporter:datatype="link"/>
3395                         <field name="source" reporter:datatype="link"/>
3396                         <field name="value"  reporter:datatype="text"/>
3397                 </fields>
3398                 <links>
3399                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3400                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3401                 </links>
3402         </class>
3403         <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">
3404                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3405                         <field name="id" reporter:datatype="id" />
3406                         <field name="value" reporter:datatype="text"/>
3407                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3408                 </fields>
3409                 <links>
3410                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3411                 </links>
3412         </class>
3413         <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">
3414                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3415                         <field name="id" reporter:datatype="id" />
3416                         <field name="entry" reporter:datatype="link"/>
3417                         <field name="def" reporter:datatype="link"/>
3418                         <field name="source" reporter:datatype="link"/>
3419                 </fields>
3420                 <links>
3421                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3422                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3423                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3424                 </links>
3425         </class>
3426         <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">
3427                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3428                         <field name="id" reporter:datatype="id" />
3429                         <field name="entry" reporter:datatype="link"/>
3430                         <field name="simple_heading" reporter:datatype="link"/>
3431                 </fields>
3432                 <links>
3433                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3434                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3435                 </links>
3436         </class>
3437         <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">
3438                 <oils_persist:source_definition>
3439                         SELECT * FROM metabib.author_field_entry
3440                                                 UNION ALL
3441                         SELECT * FROM metabib.keyword_field_entry
3442                                                 UNION ALL
3443                         SELECT * FROM metabib.identifier_field_entry
3444                                                 UNION ALL
3445                         SELECT * FROM metabib.title_field_entry
3446                                                 UNION ALL
3447                         SELECT * FROM metabib.subject_field_entry
3448                                                 UNION ALL
3449                         SELECT * FROM metabib.series_field_entry
3450                 </oils_persist:source_definition>
3451                 <fields>
3452                         <field name="field" reporter:datatype="link"/>
3453                         <field name="id" reporter:datatype="id" />
3454                         <field name="source" reporter:datatype="link"/>
3455                         <field name="value"  reporter:datatype="text"/>
3456                 </fields>
3457                 <links>
3458                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3459                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3460                 </links>
3461         </class>
3462         <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">
3463                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3464                         <field name="field" reporter:datatype="link"/>
3465                         <field name="id" reporter:datatype="id" />
3466                         <field name="source" reporter:datatype="link"/>
3467                         <field name="value"  reporter:datatype="text"/>
3468                 </fields>
3469                 <links>
3470                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3471                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3472                 </links>
3473         </class>
3474         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3475                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3476                         <field name="accepting_usr" reporter:datatype="link"/>
3477                         <field name="amount" reporter:datatype="money" />
3478                         <field name="amount_collected" reporter:datatype="money" />
3479                         <field name="cash_drawer" reporter:datatype="link"/>
3480                         <field name="id" reporter:datatype="id" />
3481                         <field name="note"  reporter:datatype="text"/>
3482                         <field name="payment_ts" reporter:datatype="timestamp"/>
3483                         <field name="xact" reporter:datatype="link"/>
3484                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3485                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3486                 </fields>
3487                 <links>
3488                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3489                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3490                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3491                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3492                 </links>
3493         </class>
3494         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3495                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3496                         <field name="accepting_usr" reporter:datatype="link"/>
3497                         <field name="amount" reporter:datatype="money" />
3498                         <field name="amount_collected" reporter:datatype="money" />
3499                         <field name="id" reporter:datatype="id" />
3500                         <field name="note"  reporter:datatype="text"/>
3501                         <field name="payment_ts" reporter:datatype="timestamp"/>
3502                         <field name="xact" reporter:datatype="link"/>
3503                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3504                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3505                 </fields>
3506                 <links>
3507                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3508                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3509                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3510                 </links>
3511         </class>
3512         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3513                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3514                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3515                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3516                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3517                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3518                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3519                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3520                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3521                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3522                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3523                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3524                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3525                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3526                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3527                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3528                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3529                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3530                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3531                 </fields>
3532                 <links>
3533                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3534                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3535                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3536                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3537                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3538                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3539                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3540                 </links>
3541         </class>
3542
3543         <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">
3544                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3545                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3546                         <field name="name"  reporter:datatype="text"/>
3547                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3548                         <field name="block_list" reporter:datatype="text"/>
3549                         <field name="staff_alert" reporter:datatype="bool"/>
3550                         <field name="org_depth" reporter:datatype="int"/>
3551                 </fields>
3552                 <links/>
3553         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3554             <actions>
3555                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3556                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3557                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3558                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3559             </actions>
3560         </permacrud>
3561         </class>
3562         <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">
3563                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3564                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3565                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3566                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3567                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3568                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3569                 </fields>
3570                 <links>
3571                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3572                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3573                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3574         </links>
3575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3576             <actions>
3577                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3578                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3579                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3580                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3581             </actions>
3582         </permacrud>
3583         </class>
3584         <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">
3585                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3586                         <field name="holdable" reporter:datatype="bool"/>
3587                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3588                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3589                         <field name="opac_visible" reporter:datatype="bool"/>
3590             <field name="copy_active" reporter:datatype="bool"/>
3591             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3592                 </fields>
3593                 <links/>
3594         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3595             <actions>
3596                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3597                 <retrieve/>
3598                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3599                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3600             </actions>
3601         </permacrud>
3602         </class>
3603         <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">
3604                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3605                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3606                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3607                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3608                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3609                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3610                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3611                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3612                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3613                 </fields>
3614                 <links>
3615                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3616                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3617                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3618                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3619                 </links>
3620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3621                         <actions>
3622                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3623                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3624                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3625                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3626                         </actions>
3627                 </permacrud>
3628         </class>
3629         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3630                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3631                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3632                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3633                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3634                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3635                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3636                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3637                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3638                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3639                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3640                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3641                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3642                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3643                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3644                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3645                 </fields>
3646                 <links>
3647                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3648                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3649                 </links>
3650         </class>
3651         <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">
3652                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3653                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3654                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3655                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3656                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3657                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3658                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3659                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3660                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3661                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3662                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3663                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3664                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3665                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3666                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3667                 </fields>
3668                 <links>
3669                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3670                 </links>
3671                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3672                         <actions>
3673                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3674                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3675                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3676                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3677                         </actions>
3678                 </permacrud>
3679         </class>
3680
3681
3682         <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">
3683                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3684                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3685                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3686                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3687                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3688                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3689                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3690                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3691                 </fields>
3692                 <links>
3693                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3694                 </links>
3695         </class>
3696
3697         <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">
3698                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3699                         <field name="call_number" />
3700                         <field name="create_date" reporter:datatype="timestamp"/>
3701                         <field name="creator" reporter:datatype="link"/>
3702                         <field name="id" reporter:datatype="id" />
3703                         <field name="pub" reporter:datatype="bool"/>
3704                         <field name="title"  reporter:datatype="text"/>
3705                         <field name="value"  reporter:datatype="text"/>
3706                 </fields>
3707                 <links>
3708                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3709                 </links>
3710         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3711             <actions>
3712                 <create permission="CREATE_VOLUME_NOTE">
3713                     <context link="call_number" field="owning_lib"/>
3714                 </create>
3715                 <retrieve permission="VIEW_VOLUME_NOTES">
3716                     <context link="call_number" field="owning_lib"/>
3717                 </retrieve>
3718                 <update permission="UPDATE_VOLUME_NOTE">
3719                     <context link="call_number" field="owning_lib"/>
3720                 </update>
3721                 <delete permission="DELETE_VOLUME_NOTE">
3722                     <context link="call_number" field="owning_lib"/>
3723                 </delete>
3724             </actions>
3725         </permacrud>
3726         </class>
3727         <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">
3728                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3729                         <field name="create_date" reporter:datatype="timestamp"/>
3730                         <field name="creator" reporter:datatype="link"/>
3731                         <field name="edit_date" reporter:datatype="timestamp"/>
3732                         <field name="editor" reporter:datatype="link"/>
3733                         <field name="id" reporter:datatype="id" />
3734                         <field name="record" reporter:datatype="link"/>
3735                         <field name="value" reporter:datatype="text"/>
3736                 </fields>
3737                 <links>
3738                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3739                 </links>
3740         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3741             <actions>
3742                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3743                 <retrieve/>
3744                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3745                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3746             </actions>
3747         </permacrud>
3748         </class>
3749         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3750         <oils_persist:source_definition>
3751 SELECT  usr,
3752         SUM(
3753             CASE
3754                 WHEN (
3755                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3756                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3757                 ) THEN 1
3758                 ELSE 0
3759             END
3760         ) AS out,
3761
3762         SUM(
3763             CASE
3764                 WHEN (
3765                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3766                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3767                 ) THEN 1
3768                 ELSE 0
3769             END
3770         ) AS overdue,
3771
3772         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3773         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3774         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3775   FROM  action.circulation
3776   WHERE checkin_time IS NULL
3777   GROUP BY 1
3778         </oils_persist:source_definition>
3779         <fields oils_persist:primary="usr">
3780             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3781             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3782             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3783             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3784             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3785             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3786         </fields>
3787         <links>
3788             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3789         </links>
3790         </class>
3791         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3792         <oils_persist:source_definition>
3793 SELECT  usr,
3794         STRING_AGG(
3795             CASE
3796                 WHEN (
3797                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3798                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3799                 ) THEN id::TEXT
3800                 ELSE '0'
3801             END
3802         ,',') AS out,
3803
3804         STRING_AGG(
3805             CASE
3806                 WHEN (
3807                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3808                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3809                 ) THEN id::TEXT
3810                 ELSE '0'
3811             END
3812         ,',') AS overdue,
3813
3814         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
3815         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id::TEXT ELSE '0' END,',') AS claims_returned,
3816         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
3817   FROM  action.circulation
3818   WHERE checkin_time IS NULL
3819   GROUP BY 1
3820         </oils_persist:source_definition>
3821         <fields oils_persist:primary="usr">
3822             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3823             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3824             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3825             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3826             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3827             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3828         </fields>
3829         <links>
3830             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3831         </links>
3832         </class>
3833         <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">
3834                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3835                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3836                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3837                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3838                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3839                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3840                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3841                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3842                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3843                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3844                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3845                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3846                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3847                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3848                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3849                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3850                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3851                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3852                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3853                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3854                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3855                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3856                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3857                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3858                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3859                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3860                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3861                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3862                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3863                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3864                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3865                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3866                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3867                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3868                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3869                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3870                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3871                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3872                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3873                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3874                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3875                 </fields>
3876                 <links>
3877                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3878                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3879                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3880                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3881                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3882                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3883                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3884                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3885                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3886                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3887                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3888                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3889                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3890                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3891                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3892                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3893                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3894                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3895                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3896                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3897                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3898                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3899                 </links>
3900                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3901                         <actions>
3902                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3903                         </actions>
3904                 </permacrud>
3905         </class>
3906         <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">
3907                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3908                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3909                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3910                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3911                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3912                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3913                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3914                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3915                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3916                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3917                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3918                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3919                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3920                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3921                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3922                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3923                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3924                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3925                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3926                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3927                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3928                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3929                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3930                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3931                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3932                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3933                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3934                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3935                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3936                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3937                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3938                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3939                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3940                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3941                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3942                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3943                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3944                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3945                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3946                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3947                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3948                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3949                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3950                 </fields>
3951                 <links>
3952                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3953                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3954                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3955                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3956                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3957                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3958                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3959                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3960                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3961                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3962                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3963                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3964                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3965                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3966                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3967                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3968                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3969                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3970                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3971                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3972                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3973                 </links>
3974         </class>
3975         <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">
3976                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3977                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3978                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3979                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3980                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3981                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3982                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3983                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3984                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3985                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3986                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3987                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3988                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3989                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3990                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3991                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3992                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3993                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3994                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3995                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3996                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3997                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3998                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3999                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4000                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4001                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
4002                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4003                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4004                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4005                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4006                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4007                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4008                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4009                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4010                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4011                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4012                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4013                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4014                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4015                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4016                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4017                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4018                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4019                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4020                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4021                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4022                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4023                 </fields>
4024                 <links>
4025                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4026                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4027                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4028                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4029                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4030                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4031                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4032                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4033                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4034                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4035                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4036                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4037                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4038                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4039                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4040                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4041                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4042                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4043                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4044                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4045                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4046                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4047                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4048                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4049                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4050                 </links>
4051         </class>
4052
4053         <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">
4054                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4055                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4056                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4057                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4058                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4059                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4060                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4061                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4062                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4063                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4064                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4065                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4066                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4067                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4068                 </fields>
4069                 <links>
4070                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4071                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4072                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4073                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4074                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4075                 </links>
4076                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4077                         <actions>
4078                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4079                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4080                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4081                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4082                         </actions>
4083                 </permacrud>
4084         </class>
4085
4086         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4087                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4088                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4089                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4090                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4091                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4092                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4093                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4094                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4095                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4096                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4097                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4098                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4099                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4100                 </fields>
4101                 <links>
4102                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4103                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4104                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4105                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4106                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4107                 </links>
4108                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4109                         <actions>
4110                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4111                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4112                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4113                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4114                         </actions>
4115                 </permacrud>
4116         </class>
4117         
4118         <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">
4119                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4120                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4121                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4122                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4123                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4124                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4125                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4126                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4127                 </fields>
4128                 <links>
4129                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4130                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4131                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4132                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4133                 </links>
4134                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4135                         <actions>
4136                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4137                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4138                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4139                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4140                         </actions>
4141                 </permacrud>
4142         </class>
4143         
4144         <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">
4145                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4146                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4147                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4148                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4149                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4150                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4151                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4152                 </fields>
4153                 <links>
4154                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4155                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4156                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4157                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4158                 </links>
4159                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4160                         <actions>
4161                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4162                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4163                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4164                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4165                         </actions>
4166                 </permacrud>
4167         </class>
4168         
4169         <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">
4170                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4171                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4172                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4173                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4174                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4175                 </fields>
4176                 <links>
4177                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4178                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4179                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4180                 </links>
4181                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4182                         <actions>
4183                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4184                     <context link="resource" field="owner" />
4185                 </create>
4186                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4187                     <context link="resource" field="owner" />
4188                 </retrieve>
4189                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4190                     <context link="resource" field="owner" />
4191                 </update>
4192                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4193                     <context link="resource" field="owner" />
4194                 </delete>
4195                         </actions>
4196                 </permacrud>
4197         </class>
4198         
4199         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4200                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4201                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4202                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4203                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4204                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4205                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4206                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4207                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4208                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4209                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4210                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4211                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4212                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4213                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4214                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4215                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4216                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4217                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4218                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4219                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4220                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4221                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4222                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4223                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4224                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4225                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4226                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4227                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4228                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4229                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4230                 </fields>
4231                 <links>
4232                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4233                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4234                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4235                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4236                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4237                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4238                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4239                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4240                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4241                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4242                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4243                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4244                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4245                 </links>
4246                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4247                         <actions>
4248                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4249                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4250                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4251                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4252                         </actions>
4253                 </permacrud>
4254         </class>
4255         
4256         <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">
4257                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4258                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4259                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4260                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4261                 </fields>
4262                 <links>
4263                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4264                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4265                 </links>
4266                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4267                         <actions>
4268                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4269                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4270                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4271                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4272                         </actions>
4273                 </permacrud>
4274         </class>
4275
4276         <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">
4277                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4278                         <field name="bucket" reporter:datatype="link"/>
4279                         <field name="id" reporter:datatype="id" />
4280                         <field name="target_call_number" reporter:datatype="link" />
4281                         <field name="create_time" reporter:datatype="timestamp" />
4282                         <field name="pos" reporter:datatype="int" />
4283                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4284                 </fields>
4285                 <links>
4286                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4287                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4288             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4289                 </links>
4290         </class>
4291         <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">
4292                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4293                         <field name="id" reporter:datatype="id" />
4294                         <field name="item" reporter:datatype="link"/>
4295                         <field name="note" reporter:datatype="text" />
4296                 </fields>
4297                 <links>
4298                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4299                 </links>
4300         </class>
4301         <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">
4302                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4303                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4304                         <field name="btype" reporter:datatype="text"/>
4305                         <field name="id" reporter:datatype="id" />
4306                         <field name="name" reporter:datatype="text"/>
4307                         <field name="description" reporter:datatype="text"/>
4308                         <field name="owner" reporter:datatype="link"/>
4309                         <field name="pub" reporter:datatype="bool"/>
4310                         <field name="create_time" reporter:datatype="timestamp" />
4311                 </fields>
4312                 <links>
4313                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4314                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4315                 </links>
4316         </class>
4317         <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">
4318                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4319                         <field name="id" reporter:datatype="id" />
4320                         <field name="bucket" reporter:datatype="link"/>
4321                         <field name="note" reporter:datatype="text" />
4322                 </fields>
4323                 <links>
4324                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4325                 </links>
4326         </class>
4327         <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">
4328                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4329                         <field name="hold" reporter:datatype="link"/>
4330                         <field name="id" reporter:datatype="id" />
4331                         <field name="target_copy" reporter:datatype="link"/>
4332                         <field name="proximity" reporter:datatype="number"/>
4333                 </fields>
4334                 <links>
4335                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4336                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4337                 </links>
4338         </class>
4339         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4340                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4341                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4342                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4343                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4344                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4345                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4346                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4347                 </fields>
4348                 <links>
4349                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4350                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4351                 </links>
4352         </class>
4353         <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">
4354                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4355                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4356                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4357                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4358                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4359                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4360                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4361                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4362                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4363                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4364                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4365                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4366                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4367                 </fields>
4368                 <links>
4369                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4370                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4371                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4372                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4373                 </links>
4374         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4375             <actions>
4376                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4377                 <retrieve/>
4378                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4379                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4380             </actions>
4381         </permacrud>
4382         </class>
4383         <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">
4384                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4385                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4386                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4387                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4388                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4389             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4390             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4391             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4392                 </fields>
4393                 <links>
4394                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4395                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4396                 </links>
4397         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4398             <actions>
4399                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4400                 <retrieve/>
4401                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4402                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4403             </actions>
4404         </permacrud>
4405         </class>
4406         <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">
4407                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4408                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4409             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4410             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4411                 </fields>
4412                 <links>
4413                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4414                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4415                 </links>
4416         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4417             <actions>
4418                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4419                                         <context link="lgroup" field="owner" />
4420                 </create>
4421                 <retrieve/>
4422                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4423                                         <context link="lgroup" field="owner" />
4424                 </update>
4425                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4426                                         <context link="lgroup" field="owner" />
4427                 </delete>
4428             </actions>
4429         </permacrud>
4430         </class>
4431
4432     <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">
4433         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4434             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4435             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4436             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4437             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4438         </fields>
4439         <links>
4440             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4441             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4442         </links>
4443         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4444             <actions>
4445                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4446                 <retrieve/>
4447                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4448                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4449             </actions>
4450         </permacrud>
4451     </class>
4452
4453         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4454                 <fields>
4455                         <field name="sre_id" oils_persist:virtual="true" />
4456                         <field name="location" oils_persist:virtual="true" />
4457                         <field name="owning_lib" oils_persist:virtual="true" />
4458                         <field name="basic_holdings" oils_persist:virtual="true" />
4459                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4460                         <field name="supplement_holdings" oils_persist:virtual="true" />
4461                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4462                         <field name="index_holdings" oils_persist:virtual="true" />
4463                         <field name="index_holdings_add" oils_persist:virtual="true" />
4464                         <field name="online" oils_persist:virtual="true" />
4465                         <field name="missing" oils_persist:virtual="true" />
4466                         <field name="incomplete" oils_persist:virtual="true" />
4467                 </fields>
4468         </class>
4469
4470         <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">
4471                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4472                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4473                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4474                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4475                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4476                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4477                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4478                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4479                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4480                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4481                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4482                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4483                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4484                 </fields>
4485                 <links>
4486                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4487                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4488                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4489                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4490                 </links>
4491                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4492                         <actions>
4493                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4494                                 <retrieve/>
4495                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4496                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4497                         </actions>
4498                 </permacrud>
4499         </class>
4500
4501         <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">
4502                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4503                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4504                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4505                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4506                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4507                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4508                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4509                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4510                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4511                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4512                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4513                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4514                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4515                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4516                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4517                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4518                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4519                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4520                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4521                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4522                 </fields>
4523                 <links>
4524                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4525                 </links>
4526                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4527                         <actions>
4528                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4529                                         <context link="subscription" field="owning_lib" />
4530                                 </create>
4531                                 <retrieve />
4532                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4533                                         <context link="subscription" field="owning_lib" />
4534                                 </update>
4535                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4536                                         <context link="subscription" field="owning_lib" />
4537                                 </delete>
4538                         </actions>
4539                 </permacrud>
4540         </class>
4541
4542         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4543                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4544                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4545                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4546                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4547                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4548                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4549                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4550                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4551                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4552                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4553                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4554                 </fields>
4555                 <links>
4556                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4557                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4558                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4559                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4560                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4561                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4562                 </links>
4563                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4564                         <actions>
4565                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4566                                 <retrieve />
4567                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4568                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4569                         </actions>
4570                 </permacrud>
4571         </class>
4572
4573         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4574                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4575                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4576                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4577                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4578                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4579                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4580                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4581                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4582                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4583                 </fields>
4584                 <links>
4585                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4586                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4587                 </links>
4588         </class>
4589
4590         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4591                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4592                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4593                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4594                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4595                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4596                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4597                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4598                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4599                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4600                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4601                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4602                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4603                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4604                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4605                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4606                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4607                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4608                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4609                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4610                 </fields>
4611                 <links>
4612                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4613                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4614                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4615                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4616                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4617                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4618                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4619                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4620                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4621                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4622                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4623                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4624                 </links>
4625                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4626                         <actions>
4627                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4628                                 <retrieve />
4629                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4630                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4631                         </actions>
4632                 </permacrud>
4633         </class>
4634
4635         <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">
4636                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4637                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4638                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4639                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4640                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4641                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4642                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4643                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4644                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4645                 </fields>
4646                 <links>
4647                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4648                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4649                 </links>
4650                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4651                         <actions>
4652                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4653                                         <context link="distribution" field="holding_lib" />
4654                                 </create>
4655                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4656                                         <context link="distribution" field="holding_lib" />
4657                                 </retrieve>
4658                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4659                                         <context link="distribution" field="holding_lib" />
4660                                 </update>
4661                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4662                                         <context link="distribution" field="holding_lib" />
4663                                 </delete>
4664                         </actions>
4665                 </permacrud>
4666         </class>
4667
4668         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4669                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4670                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4671                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4672                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4673                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4674                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4675                 </fields>
4676                 <links>
4677                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4678                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4679                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4680                 </links>
4681                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4682                         <actions>
4683                                 <create permission="ADMIN_SERIAL_STREAM">
4684                                         <context link="distribution" field="holding_lib" />
4685                                 </create>
4686                                 <retrieve />
4687                                 <update permission="ADMIN_SERIAL_STREAM">
4688                                         <context link="distribution" field="holding_lib" />
4689                                 </update>
4690                                 <delete permission="ADMIN_SERIAL_STREAM">
4691                                         <context link="distribution" field="holding_lib" />
4692                                 </delete>
4693                         </actions>
4694                 </permacrud>
4695         </class>
4696
4697         <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">
4698                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4699                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4700                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4701                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4702                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4703                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4704                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4705                 </fields>
4706                 <links>
4707                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4708                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4709                 </links>
4710                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4711                         <actions>
4712                                 <create permission="ADMIN_SERIAL_STREAM">
4713                                         <context link="stream" jump="distribution" field="holding_lib" />
4714                                 </create>
4715                                 <retrieve permission="RECEIVE_SERIAL">
4716                                         <context link="stream" jump="distribution" field="holding_lib" />
4717                                 </retrieve>
4718                                 <update permission="ADMIN_SERIAL_STREAM">
4719                                         <context link="stream" jump="distribution" field="holding_lib" />
4720                                 </update>
4721                                 <delete permission="ADMIN_SERIAL_STREAM">
4722                                         <context link="stream" jump="distribution" field="holding_lib" />
4723                                 </delete>
4724                         </actions>
4725                 </permacrud>
4726         </class>
4727
4728         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4729                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4730                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4731                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4732                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4733                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4734                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4735                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4736                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4737                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4738                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4739                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4740                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4741                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4742                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4743                 </fields>
4744                 <links>
4745                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4746                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4747                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4748                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4749                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4750                 </links>
4751                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4752                         <actions>
4753                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4754                                         <context link="subscription" field="owning_lib" />
4755                                 </create>
4756                                 <retrieve/>
4757                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4758                                         <context link="subscription" field="owning_lib" />
4759                                 </update>
4760                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4761                                         <context link="subscription" field="owning_lib" />
4762                                 </delete>
4763                         </actions>
4764                 </permacrud>
4765         </class>
4766
4767         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4768                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4769                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4770                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4771                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4772                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4773                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4774                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4775                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4776                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4777                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4778                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4779                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4780                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4781                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4782                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4783                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4784                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4785                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4786                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4787                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4788                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4789                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4790                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4791                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4792                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4793                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4794                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4795                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4796                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4797                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4798                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4799                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4800                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
4801                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4802                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4803                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4804                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4805                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4806                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4807                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4808                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4809                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4810                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4811                 </fields>
4812                 <links>
4813                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4814                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4815                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4816                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4817                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4818                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4819                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4820                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4821                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4822                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4823                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4824                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4825                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4826                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4827                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
4828                 </links>
4829                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4830                         <actions>
4831                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4832                                 <retrieve/>
4833                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4834                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4835                         </actions>
4836                 </permacrud>
4837         </class>
4838
4839         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4840                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4841                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4842                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4843                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4844                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4845                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4846                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4847                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4848                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4849                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4850                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4851                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4852                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4853                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4854                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4855                 </fields>
4856                 <links>
4857                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4858                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4859                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4860                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4861                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4862                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4863                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4864                 </links>
4865                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4866                         <actions>
4867                                 <create permission="ADMIN_SERIAL_ITEM">
4868                                         <context link="stream" jump="distribution" field="holding_lib" />
4869                                 </create>
4870                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4871                                         <context link="stream" jump="distribution" field="holding_lib" />
4872                                 </retrieve>
4873                                 <update permission="ADMIN_SERIAL_ITEM">
4874                                         <context link="stream" jump="distribution" field="holding_lib" />
4875                                 </update>
4876                                 <delete permission="ADMIN_SERIAL_ITEM">
4877                                         <context link="stream" jump="distribution" field="holding_lib" />
4878                                 </delete>
4879                         </actions>
4880                 </permacrud>
4881         </class>
4882
4883         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4884                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4885                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4886                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4887                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4888                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4889                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4890                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4891                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4892                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4893                 </fields>
4894                 <links>
4895                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4896                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4897                 </links>
4898                 <!-- Not available via PCRUD at this time -->
4899         </class>
4900         <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">
4901                 <fields>
4902                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4903                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4904                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4905                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4906                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4907                 </fields>
4908                 <links>
4909                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4910                 </links>
4911         </class>
4912         <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">
4913                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4914                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4915                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4916                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4917                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4918                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4919                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4920                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4921                 </fields>
4922                 <links>
4923                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4924                 </links>
4925         </class>
4926         <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">
4927                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4928                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4929                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4930                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4931                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4932                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4933                 </fields>
4934                 <links>
4935                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4936                 </links>
4937                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4938                         <actions>
4939                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4940                                         <context link="distribution" field="holding_lib" />
4941                                 </create>
4942                                 <retrieve/>
4943                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4944                                         <context link="distribution" field="holding_lib" />
4945                                 </update>
4946                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4947                                         <context link="distribution" field="holding_lib" />
4948                                 </delete>
4949                         </actions>
4950                 </permacrud>
4951         </class>
4952
4953         <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">
4954                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4955                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4956                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4957                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4958                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4959                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4960                 </fields>
4961                 <links>
4962                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4963                 </links>
4964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4965                         <actions>
4966                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4967                                         <context link="distribution" field="holding_lib" />
4968                                 </create>
4969                                 <retrieve/>
4970                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4971                                         <context link="distribution" field="holding_lib" />
4972                                 </update>
4973                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4974                                         <context link="distribution" field="holding_lib" />
4975                                 </delete>
4976                         </actions>
4977                 </permacrud>
4978         </class>
4979
4980         <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">
4981                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4982                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4983                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4984                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4985                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4986                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4987                 </fields>
4988                 <links>
4989                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4990                 </links>
4991                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4992                         <actions>
4993                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4994                                         <context link="distribution" field="holding_lib" />
4995                                 </create>
4996                                 <retrieve/>
4997                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4998                                         <context link="distribution" field="holding_lib" />
4999                                 </update>
5000                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5001                                         <context link="distribution" field="holding_lib" />
5002                                 </delete>
5003                         </actions>
5004                 </permacrud>
5005         </class>
5006
5007         <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">
5008                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5009                         <field name="id" reporter:datatype="id" />
5010                         <field name="owning_copy" reporter:datatype="link"/>
5011                         <field name="stat_cat" reporter:datatype="link"/>
5012                         <field name="stat_cat_entry" reporter:datatype="link"/>
5013                 </fields>
5014                 <links>
5015                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5016                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5017                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5018                 </links>
5019         </class>
5020         <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">
5021                 <fields oils_persist:primary="code">
5022                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5023                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5024                 </fields>
5025                 <links/>
5026         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5027             <actions>
5028                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5029                 <retrieve/>
5030                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5031                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5032             </actions>
5033         </permacrud>
5034         </class>
5035         <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">
5036                 <fields oils_persist:primary="code">
5037                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5038                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5039                 </fields>
5040                 <links/>
5041         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5042             <actions>
5043                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5044                 <retrieve/>
5045                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5046                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5047             </actions>
5048         </permacrud>
5049         </class>
5050         <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">
5051                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5052                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5053                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5054                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5055                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5056                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5057                 </fields>
5058                 <links>
5059             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5060         </links>
5061         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5062             <actions>
5063                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5064                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5065                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5066                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5067             </actions>
5068         </permacrud>
5069         </class>
5070         <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">
5071                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5072                         <field name="id" reporter:datatype="id" />
5073                         <field name="name" reporter:datatype="text"/>
5074                 </fields>
5075                 <links/>
5076         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5077             <actions>
5078                 <create permission="CREATE_LASSO" global_required="true"/>
5079                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5080                 <update permission="UPDATE_LASSO" global_required="true"/>
5081                 <delete permission="DELETE_LASSO" global_required="true"/>
5082             </actions>
5083         </permacrud>
5084         </class>
5085         <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">
5086                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5087                         <field name="id" reporter:datatype="id" />
5088                         <field name="lasso" reporter:datatype="link"/>
5089                         <field name="org_unit" reporter:datatype="org_unit"/>
5090                 </fields>
5091                 <links>
5092                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5093                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5094                 </links>
5095         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5096             <actions>
5097                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5098                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5099                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5100                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5101             </actions>
5102         </permacrud>
5103         </class>
5104         <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">
5105                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5106                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5107                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5108                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5109                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5110                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5111                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5112                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5113                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5114                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5115                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5116                 </fields>
5117                 <links>
5118                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5119                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5120                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5121                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5122                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5123                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5124                 </links>
5125         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5126             <actions>
5127                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5128                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5129                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5130                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5131             </actions>
5132         </permacrud>
5133         </class>
5134         <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">
5135                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5136                         <field name="id" reporter:datatype="id" />
5137                         <field name="from_org" reporter:datatype="org_unit"/>
5138                         <field name="to_org" reporter:datatype="org_unit"/>
5139                         <field name="prox" reporter:datatype="int" />
5140                 </fields>
5141                 <links>
5142                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5143                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5144                 </links>
5145         </class>
5146         <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">
5147                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5148                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5149                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5150                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5151                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5152                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5153                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5154                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5155                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5156                 </fields>
5157                 <links/>
5158         </class>
5159         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5160                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5161                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5162                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5163                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5164                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5165                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5166                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5167                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5168                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5169                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5170                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5171                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5172                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5173                 </fields>
5174                 <links>
5175                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5176                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5177                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5178                 </links>
5179         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5180             <actions>
5181                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5182                 <retrieve/>
5183                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5184                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5185             </actions>
5186         </permacrud>
5187         </class>
5188         <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">
5189                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5190                         <field name="address_type"  reporter:datatype="text"/>
5191                         <field name="city"  reporter:datatype="text"/>
5192                         <field name="country"  reporter:datatype="text"/>
5193                         <field name="county"  reporter:datatype="text"/>
5194                         <field name="id" reporter:datatype="id" />
5195                         <field name="org_unit" reporter:datatype="org_unit"/>
5196                         <field name="post_code"  reporter:datatype="text"/>
5197                         <field name="state"  reporter:datatype="text"/>
5198                         <field name="street1"  reporter:datatype="text"/>
5199                         <field name="street2"  reporter:datatype="text"/>
5200                         <field name="valid" reporter:datatype="bool"/>
5201                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5202                 </fields>
5203                 <links>
5204                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5205                 </links>
5206         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5207             <actions>
5208                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5209                 <retrieve/>
5210                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5211                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5212             </actions>
5213         </permacrud>
5214         </class>
5215         <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">
5216                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5217                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5218                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5219                         <field name="query_text" reporter:datatype="text"/>
5220                 </fields>
5221         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5222             <actions>
5223                 <retrieve/>
5224             </actions>
5225         </permacrud>
5226         </class>
5227
5228         <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">
5229                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5230                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5231                         <field name="owner" reporter:datatype="org_unit"/>
5232                         <field name="code" reporter:datatype="text"/>
5233                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5234                         <field name="create_date" reporter:datatype="timestamp"/>
5235                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5236                 </fields>
5237                 <links>
5238                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5239                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5240                 </links>
5241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5242             <actions>
5243                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5244                 <retrieve/>
5245                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5246                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5247             </actions>
5248         </permacrud>
5249         </class>
5250         <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">
5251                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5252                         <field name="id" reporter:datatype="id"/>
5253                         <field name="grp" reporter:datatype="link"/>
5254                         <field name="pos" reporter:datatype="int"/>
5255                         <field name="query" reporter:datatype="link"/>
5256                 </fields>
5257                 <links>
5258                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5259                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5260                 </links>
5261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5262             <actions>
5263                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5264                     <context link="grp" field="owner"/>
5265                 </create>
5266                 <retrieve/>
5267                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5268                     <context link="grp" field="owner"/>
5269                 </update>
5270                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5271                     <context link="grp" field="owner"/>
5272                 </delete>
5273             </actions>
5274         </permacrud>
5275         </class>
5276
5277         <!-- A note: Please update alhr and ahopl when updating ahr -->
5278         <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">
5279                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5280                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5281                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5282                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5283                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5284                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5285                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5286                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5287                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5288                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5289                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5290                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5291                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5292                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5293                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5294                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5295                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5296                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5297                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5298                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5299                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5300                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5301                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5302                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5303                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5304                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5305                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5306                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5307                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5308                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5309                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5310                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5311                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5312                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5313                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5314                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5315                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5316                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5317                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5318                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5319                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5320                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5321                 </fields>
5322                 <links>
5323                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5324                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5325                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5326                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5327                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5328                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5329                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5330                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5331                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5332                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5333                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5334                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5335                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5336                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5337                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5338                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5339                 </links>
5340                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5341                         <actions>
5342                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5343                         </actions>
5344                 </permacrud>
5345         </class>
5346         <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">
5347                 <oils_persist:source_definition><![CDATA[
5348                 SELECT
5349                         ahr.*,
5350                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5351                                 copy_location_order_position,
5352                         CASE WHEN au.alias IS NOT NULL THEN
5353                                 au.alias
5354                         ELSE
5355                                 au.first_given_name
5356                         END AS usr_alias_or_first_given_name,
5357                         au.first_given_name AS usr_first_given_name,
5358                         au.second_given_name AS usr_second_given_name,
5359                         au.family_name AS usr_family_name,
5360                         au.prefix AS usr_prefix,
5361                         au.suffix AS usr_suffix,
5362                         au.alias AS usr_alias,
5363                         CASE WHEN au.alias IS NOT NULL THEN
5364                                 au.alias
5365                         ELSE
5366                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5367                                         COALESCE(au.family_name, ''),
5368                                         COALESCE(au.suffix, ''),
5369                                         ', ',
5370                                         COALESCE(au.prefix, ''),
5371                                         COALESCE(au.first_given_name, ''),
5372                                         COALESCE(au.second_given_name, '')
5373                                 ], ' '), E'\\s+,', ',')
5374                         END AS usr_alias_or_display_name,
5375                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5376                                 COALESCE(au.family_name, ''),
5377                                 COALESCE(au.suffix, ''),
5378                                 ', ',
5379                                 COALESCE(au.prefix, ''),
5380                                 COALESCE(au.first_given_name, ''),
5381                                 COALESCE(au.second_given_name, '')
5382                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5383                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5384                                 AS call_number_label,
5385                         siss.label AS issuance_label,
5386                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5387                         ahcm_1.copy_count AS potential_copies
5388                 FROM action.hold_request ahr
5389                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5390                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5391                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5392                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5393                 JOIN actor.usr au ON (au.id = ahr.usr)
5394                 JOIN (
5395                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5396                         FROM asset.copy_location
5397                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5398                 LEFT JOIN actor.usr_standing_penalty ausp 
5399                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5400                 LEFT JOIN config.standing_penalty csp
5401                         ON (
5402                                 csp.id = ausp.standing_penalty AND 
5403                                 csp.block_list LIKE '%CAPTURE%' AND (
5404                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5405                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5406                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5407                                         )
5408                                 )
5409                         )
5410                 JOIN (
5411                         SELECT COUNT(target_copy) AS copy_count, hold
5412                         FROM action.hold_copy_map
5413                         GROUP BY 2
5414                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5415                 LEFT JOIN serial.issuance siss
5416                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5417                 LEFT JOIN asset.copy_location_order acplo
5418                         ON (acp.location = acplo.location AND
5419                                 acp.circ_lib = acplo.org)
5420                 WHERE
5421                         ahr.capture_time IS NULL AND
5422                         ahr.cancel_time IS NULL AND
5423                         csp.id IS NULL AND
5424                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5425                 ]]></oils_persist:source_definition>
5426                 <fields oils_persist:primary="id">
5427                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5428                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5429                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5430                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5431                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5432                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5433                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5434                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5435                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5436                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5437                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5438                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5439                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5440                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5441                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5442                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5443                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5444                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5445                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5446                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5447                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5448                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5449                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5450                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5451                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5452                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5453                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5454                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5455                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5456                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5457                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5458                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5459                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5460                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5461                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5462                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5463                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5464                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5465                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5466                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5467                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5468                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5469                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5470                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5471                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5472                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5473                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5474                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5475                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5476                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5477                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5478                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5479                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5480                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5481                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5482                 </fields>
5483                 <links>
5484                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5485                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5486                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5487                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5488                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5489                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5490                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5491                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5492                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5493                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5494                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5495                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5496                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5497                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5498                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5499                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5500                 </links>
5501                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5502                         <actions>
5503                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5504                         </actions>
5505                 </permacrud>
5506         </class>
5507         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5508                 <oils_persist:source_definition>
5509                         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)
5510                 </oils_persist:source_definition>
5511                 <fields oils_persist:primary="id">
5512                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5513                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5514                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5515                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5516                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5517                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5518                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5519                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5520                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5521                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5522                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5523                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5524                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5525                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5526                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5527                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5528                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5529                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5530                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5531                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5532                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5533                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5534                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5535                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5536                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5537                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5538                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5539                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5540                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5541                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5542                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5543                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5544                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5545                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5546                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5547                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5548                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5549                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5550                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5551                 </fields>
5552                 <links>
5553                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5554                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5555                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5556                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5557                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5558                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5559                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5560                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5561                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5562                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5563                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5564                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5565                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5566                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5567                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5568                 </links>
5569         </class>
5570
5571         <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">
5572                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5573                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5574                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5575                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5576                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5577                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5578                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5579                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5580                 </fields>
5581                 <links>
5582                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5583                 </links>
5584                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5585                         <actions>
5586                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5587                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5588                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5589                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5590                         </actions>
5591                 </permacrud>
5592         </class>
5593         <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">
5594                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5595                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5596                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5597                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5598                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5599                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5600                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5601                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5602                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5603                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5604                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5605                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5606                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5607                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5608                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5609                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5610                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5611                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5612                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5613                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5614                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5615                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5616                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5617                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5618                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5619                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5620                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5621                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5622                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5623                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5624                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5625                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5626                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5627                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5628                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5629                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5630                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5631                 </fields>
5632                 <links>
5633                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5634                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5635                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5636                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5637                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5638                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5639                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5640                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5641                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5642                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5643                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5644                 </links>
5645                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5646                         <actions>
5647                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5648                         </actions>
5649                 </permacrud>
5650         </class>
5651         <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">
5652                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5653                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5654                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5655                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5656                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5657                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5658                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5659                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5660                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5661                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5662                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5663                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5664                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5665                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5666                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5667                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5668                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5669                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5670                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5671                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5672                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5673                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5674                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5675                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5676                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5677                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5678                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5679                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5680                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5681                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5682                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5683                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5684                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5685                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5686                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5687                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5688                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5689                 </fields>
5690                 <links>
5691                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5692                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5693                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5694                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5695                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5696                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5697                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5698                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5699                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5700                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5701                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5702                 </links>
5703                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5704                         <actions>
5705                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5706                         </actions>
5707                 </permacrud>
5708         </class>
5709
5710         <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">
5711                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5712                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5713                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5714                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5715                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5716                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5717                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5718                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5719                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5720                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5721                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5722                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5723                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5724                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5725                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5726                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5727                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5728                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5729                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5730                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5731                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5732                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5733                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5734                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5735                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5736                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5737                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5738                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5739                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5740                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5741                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5742                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5743                 </fields>
5744                 <links>
5745                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5746                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5747                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5748                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5749                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5750                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5751                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5752                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5753                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5754                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5755                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5756                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5757                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5758                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5759                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5760                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5761                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5762                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5763                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5764                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5765                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5766                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5767                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5768                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5769                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5770                 </links>
5771         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5772             <actions>
5773                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5774                 <retrieve />
5775                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5776                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5777             </actions>
5778         </permacrud>
5779         </class>
5780         <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">
5781                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5782                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5783                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5784                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5785                 </fields>
5786                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5787                         <actions>
5788                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5789                                 <retrieve/>
5790                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5791                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5792                         </actions>
5793                 </permacrud>
5794         </class>
5795         <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">
5796                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5797                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5798                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5799                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5800                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5801                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5802                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5803                 </fields>
5804                 <links>
5805                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5806                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5807                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5808                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5809                 </links>
5810                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5811                         <actions>
5812                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5813                                 <retrieve/>
5814                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5815                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5816                         </actions>
5817                 </permacrud>
5818         </class>
5819         <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">
5820                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5821                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5822                         <field name="btype" reporter:datatype="text"/>
5823                         <field name="id" reporter:datatype="id" />
5824                         <field name="name"  reporter:datatype="text"/>
5825                         <field name="description" reporter:datatype="text"/>
5826                         <field name="owner" reporter:datatype="link"/>
5827                         <field name="pub" reporter:datatype="bool"/>
5828                         <field name="create_time" reporter:datatype="timestamp" />
5829                 </fields>
5830                 <links>
5831                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5832                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5833                 </links>
5834         </class>
5835         <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">
5836                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5837                         <field name="id" reporter:datatype="id" />
5838                         <field name="bucket" reporter:datatype="link"/>
5839                         <field name="note" reporter:datatype="text" />
5840                 </fields>
5841                 <links>
5842                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5843                 </links>
5844         </class>
5845         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5846                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5847                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5848                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5849                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5850                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5851                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5852                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5853                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5854                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5855                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5856                 </fields>
5857                 <links>
5858                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5859                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5860                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5861                 </links>
5862         </class>
5863         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5864                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5865                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5866                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5867                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5868                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5869                 </fields>
5870                 <links>
5871                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5872                 </links>
5873                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5874                         <actions>
5875                                 <retrieve permission="VIEW_USER">
5876                                         <context link="usr" field="home_ou" />
5877                                 </retrieve>
5878                         </actions>
5879                 </permacrud>
5880         </class>
5881     <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">
5882         <fields oils_persist:primary="field">
5883             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5884             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5885             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5886         </fields>
5887         <links/>
5888         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5889             <actions>
5890                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5891                 <retrieve />
5892                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5893                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5894             </actions>
5895         </permacrud>
5896     </class>
5897         <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">
5898                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5899                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5900                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5901                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5902                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5903                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5904                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5905                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5906                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5907                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5908                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5909                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5910                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5911                 </fields>
5912                 <links>
5913                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5914                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5915                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5916                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5917                 </links>
5918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5919             <actions>
5920                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5921                 <retrieve />
5922                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5923                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5924             </actions>
5925         </permacrud>
5926         </class>
5927         <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">
5928                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5929                         <field name="field" reporter:datatype="link"/>
5930                         <field name="id" reporter:datatype="id" />
5931                         <field name="source" reporter:datatype="link"/>
5932                         <field name="value"  reporter:datatype="text"/>
5933                 </fields>
5934                 <links>
5935                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5936                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5937                 </links>
5938         </class>
5939         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5940                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5941                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5942                         <field name="btype" reporter:datatype="text"/>
5943                         <field name="id" reporter:datatype="id" />
5944                         <field name="name"  reporter:datatype="text"/>
5945                         <field name="description" reporter:datatype="text"/>
5946                         <field name="owner" reporter:datatype="link"/>
5947                         <field name="pub" reporter:datatype="bool"/>
5948                         <field name="create_time" reporter:datatype="timestamp" />
5949                 </fields>
5950                 <links>
5951                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5952                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5953                 </links>
5954         </class>
5955         <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">
5956                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5957                         <field name="id" reporter:datatype="id" />
5958                         <field name="bucket" reporter:datatype="link"/>
5959                         <field name="note" reporter:datatype="text" />
5960                 </fields>
5961                 <links>
5962                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5963                 </links>
5964         </class>
5965         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5966                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5967                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5968                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5969                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5970                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5971                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5972                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5973                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5974                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5975                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5976                 </fields>
5977                 <links>
5978                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5979                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5980                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5981                 </links>
5982         </class>
5983         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5984                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5985                         <field name="id" reporter:datatype="id" />
5986                         <field name="ind1" />
5987                         <field name="ind2" />
5988                         <field name="record" />
5989                         <field name="subfield" />
5990                         <field name="tag" />
5991                         <field name="value" />
5992                 </fields>
5993                 <links>
5994                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5995                 </links>
5996         </class>
5997         <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">
5998                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
5999                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6000                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6001                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6002                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6003                 </fields>
6004                 <links>
6005                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6006                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6007                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6008                 </links>
6009         </class>
6010         <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">
6011                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6012                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6013                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6014                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6015                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6016                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6017                 </fields>
6018                 <links>
6019                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6020                 </links>
6021         </class>
6022         <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">
6023                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6024                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6025                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6026                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6027                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6028                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6029                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6030                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6031                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6032                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6033                 </fields>
6034                 <links>
6035                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6036                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6037                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6038                 </links>
6039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6040             <actions>
6041                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6042                 <retrieve/>
6043                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6044                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6045             </actions>
6046         </permacrud>
6047         </class>
6048         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6049                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6050                         <field name="create_date" reporter:datatype="timestamp"/>
6051                         <field name="creator" reporter:datatype="link"/>
6052                         <field name="edit_date" reporter:datatype="timestamp"/>
6053                         <field name="editor" reporter:datatype="link"/>
6054                         <field name="id" reporter:datatype="id" />
6055                         <field name="pub" reporter:datatype="bool"/>
6056                         <field name="record" reporter:datatype="link"/>
6057                         <field name="value"  reporter:datatype="text"/>
6058                 </fields>
6059                 <links>
6060                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6061                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6062                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6063                 </links>
6064         </class>
6065         <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">
6066                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6067                         <field name="balance_owed" reporter:datatype="money" />
6068                         <field name="total_owed" reporter:datatype="money" />
6069                         <field name="total_paid" reporter:datatype="money" />
6070                         <field name="usr" reporter:datatype="link"/>
6071                 </fields>
6072                 <links>
6073                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6074                 </links>
6075         </class>
6076         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6077                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6078                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6079                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6080                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6081                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6082                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6083                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6084                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6085                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6086                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6087                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6088                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6089                 </fields>
6090                 <links>
6091                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6092                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6093                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6094                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6095                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6096                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6097                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6098                 </links>
6099         </class>
6100         <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">
6101                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6102                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6103                         <field name="quality" reporter:datatype="int" />
6104                         <field name="source" reporter:datatype="text"/>
6105                         <field name="transcendant" reporter:datatype="bool"/>
6106                         <field name="can_have_copies" reporter:datatype="bool"/>
6107                 </fields>
6108                 <links/>
6109         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6110             <actions>
6111                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6112                 <retrieve/>
6113                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6114                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6115             </actions>
6116         </permacrud>
6117         </class>
6118         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
6119                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6120                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6121                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6122                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6123                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6124                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6125                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6126                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6127                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6128                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6129                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6130                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6131                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6132                 </fields>
6133                 <links>
6134                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6135                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6136                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6137                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6138                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6139                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6140                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6141                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6142                 </links>
6143         </class>
6144         <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">
6145                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6146                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6147                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6148                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6149                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6150                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6151                 </fields>
6152                 <links>
6153                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6154                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6155                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6156                 </links>
6157         </class>
6158         <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">
6159                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6160                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6161                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6162                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6163                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6164                 </fields>
6165                 <links>
6166                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6167                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6168                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6169                 </links>
6170         </class>
6171         <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">
6172                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6173                         <field name="bucket" reporter:datatype="link"/>
6174                         <field name="id" reporter:datatype="id" />
6175                         <field name="target_user" reporter:datatype="link"/>
6176                         <field name="create_time" reporter:datatype="timestamp" />
6177                         <field name="pos" reporter:datatype="int" />
6178                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6179                 </fields>
6180                 <links>
6181                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6182                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6183             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6184                 </links>
6185         </class>
6186         <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">
6187                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6188                         <field name="id" reporter:datatype="id" />
6189                         <field name="item" reporter:datatype="link"/>
6190                         <field name="note" reporter:datatype="text" />
6191                 </fields>
6192                 <links>
6193                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6194                 </links>
6195         </class>
6196         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6197                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6198                         <field name="balance_owed" reporter:datatype="money" />
6199                         <field name="total_owed" reporter:datatype="money" />
6200                         <field name="total_paid" reporter:datatype="money" />
6201                         <field name="usr" reporter:datatype="link"/>
6202                 </fields>
6203                 <links>
6204                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6205                 </links>
6206         </class>
6207         <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">
6208                 <fields oils_persist:primary="code" oils_persist:sequence="">
6209                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6210                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6211                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6212                 </fields>
6213                 <links/>
6214         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6215             <actions>
6216                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6217                 <retrieve/>
6218                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6219                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6220             </actions>
6221         </permacrud>
6222         </class>
6223         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
6224                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6225                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6226                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6227                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6228                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6229                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6230                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6231                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6232                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6233                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6234                 </fields>
6235                 <links>
6236                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6237                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6238                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6239                 </links>
6240         </class>
6241         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
6242                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6243                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6244                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6245                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6246                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6247                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6248                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6249                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6250                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6251                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6252                 </fields>
6253                 <links>
6254                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6255                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6256                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6257                 </links>
6258         </class>
6259         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6260                 <fields oils_persist:primary="id" oils_persist:sequence="">
6261                         <field name="checkin_lib" reporter:datatype="link"/>
6262                         <field name="checkin_staff" reporter:datatype="link"/>
6263                         <field name="checkin_time" reporter:datatype="timestamp"/>
6264                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6265                         <field name="circ_staff" reporter:datatype="link"/>
6266                         <field name="desk_renewal" reporter:datatype="bool"/>
6267                         <field name="due_date" reporter:datatype="timestamp"/>
6268                         <field name="duration" reporter:datatype="interval"/>
6269                         <field name="duration_rule" reporter:datatype="link"/>
6270                         <field name="fine_interval" reporter:datatype="interval"/>
6271                         <field name="id" reporter:datatype="id" />
6272                         <field name="max_fine" reporter:datatype="money" />
6273                         <field name="max_fine_rule" reporter:datatype="link"/>
6274                         <field name="opac_renewal" reporter:datatype="bool"/>
6275                         <field name="phone_renewal" reporter:datatype="bool"/>
6276                         <field name="recurring_fine" reporter:datatype="money" />
6277                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6278                         <field name="renewal_remaining" reporter:datatype="int" />
6279             <field name="grace_period" reporter:datatype="interval" />
6280                         <field name="stop_fines" reporter:datatype="text"/>
6281                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6282                         <field name="target_copy" reporter:datatype="link"/>
6283                         <field name="usr" reporter:datatype="link"/>
6284                         <field name="xact_finish" reporter:datatype="timestamp" />
6285                         <field name="xact_start" reporter:datatype="timestamp" />
6286                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6287                 </fields>
6288                 <links>
6289                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6290                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6291                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6292                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6293                 </links>
6294         </class>
6295         <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">
6296                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6297                         <field name="field" reporter:datatype="link"/>
6298                         <field name="id" reporter:datatype="id" />
6299                         <field name="source" reporter:datatype="link"/>
6300                         <field name="value" reporter:datatype="text"/>
6301                 </fields>
6302                 <links>
6303                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6304                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6305                 </links>
6306         </class>
6307         <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">
6308                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6309                         <field name="high" reporter:datatype="money" />
6310                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6311                         <field name="low" reporter:datatype="money" />
6312                         <field name="name" reporter:datatype="text"/>
6313                         <field name="normal" reporter:datatype="money" />
6314                         <field name="recurrence_interval" reporter:datatype="interval"/>
6315             <field name="grace_period" reporter:datatype="interval" />
6316                 </fields>
6317                 <links/>
6318         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6319             <actions>
6320                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6321                 <retrieve/>
6322                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6323                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6324             </actions>
6325         </permacrud>
6326         </class>
6327         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
6328                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6329                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6330                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6331                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6332                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6333                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6334                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6335                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6336                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6337                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6338                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6339                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6340                 </fields>
6341                 <links>
6342                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6343                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6344                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6345                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6346                 </links>
6347         </class>
6348         <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">
6349                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6350                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6351                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6352                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6353                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6354                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6355                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6356                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6357                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6358                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6359                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6360                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6361                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6362                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6363                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6364                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6365                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6366                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6367                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6368                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6369                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6370                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6371                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6372                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6373                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6374                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6375                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6376                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6377                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6378                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6379                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6380                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6381                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6382                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6383                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6384                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6385                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6386                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6387                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6388                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6389                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6390                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6391                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6392                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6393                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6394                 </fields>
6395                 <links>
6396                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6397                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6398                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6399                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6400                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6401                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6402                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6403                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6404                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6405                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6406                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6407                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6408                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6409                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6410                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6411                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6412                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6413                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6414                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6415                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6416                 </links>
6417         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6418             <actions>
6419                 <create permission="CREATE_COPY">
6420                     <context link="call_number" field="owning_lib"/>
6421                 </create>
6422                 <retrieve/>
6423                 <update permission="UPDATE_COPY">
6424                     <context link="call_number" field="owning_lib"/>
6425                 </update>
6426                 <delete permission="DELETE_COPY">
6427                     <context link="call_number" field="owning_lib"/>
6428                 </delete>
6429             </actions>
6430         </permacrud>
6431         </class>
6432
6433         <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">
6434                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6435                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6436                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6437                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6438                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6439                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6440                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6441                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6442                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6443                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6444                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6445                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6446                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6447                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6448                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6449                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6450                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6451                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6452                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6453                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6454                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6455                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6456                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6457                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6458                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6459                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6460                 </fields>
6461                 <links>
6462                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6463                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6464                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6465                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6466                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6467                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6468                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6469                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6470                 </links>
6471                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6472                         <actions>
6473                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6474                                 <retrieve />
6475                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6476                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6477                         </actions>
6478                 </permacrud>
6479         </class>
6480
6481         <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">
6482                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6483                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6484                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6485                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6486                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6487                 </fields>
6488                 <links/>
6489         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6490             <actions>
6491                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6492                 <retrieve/>
6493                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6494                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6495             </actions>
6496         </permacrud>
6497         </class>
6498         <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">
6499                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6500                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6501                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6502                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6503                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6504                 </fields>
6505                 <links/>
6506         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6507             <actions>
6508                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6509                 <retrieve/>
6510                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6511                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6512             </actions>
6513         </permacrud>
6514         </class>
6515         <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">
6516                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6517                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6518                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6519                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6520                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6521                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6522                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6523                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6524                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6525                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6526                 </fields>
6527                 <links>
6528                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6529                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6530                 </links>
6531         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6532             <actions>
6533                 <create permission="CREATE_PERM" global_required="true"/>
6534                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6535                 <update permission="UPDATE_PERM" global_required="true"/>
6536                 <delete permission="DELETE_PERM" global_required="true"/>
6537             </actions>
6538         </permacrud>
6539         </class>
6540         <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">
6541                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6542                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6543                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6544                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6545                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6546                 </fields>
6547                 <links>
6548                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6549                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6550                 </links>
6551         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6552             <actions>
6553                 <create permission="ADMIN_SURVEY">
6554                     <context link="question" jump="survey" field="owner"/>
6555                 </create>
6556                 <retrieve/>
6557                 <update permission="ADMIN_SURVEY">
6558                     <context link="question" jump="survey" field="owner"/>
6559                 </update>
6560                 <delete permission="ADMIN_SURVEY">
6561                     <context link="question" jump="survey" field="owner"/>
6562                 </delete>
6563             </actions>
6564         </permacrud>
6565         </class>
6566         <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">
6567                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6568                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6569                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6570                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6571                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6572                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6573                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6574                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6575                 </fields>
6576                 <links>
6577                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6578                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6579                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6580                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6581                 </links>
6582         </class>
6583         <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">
6584                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6585                         <field name="balance_owed" reporter:datatype="money" />
6586                         <field name="total_owed" reporter:datatype="money" />
6587                         <field name="total_paid" reporter:datatype="money" />
6588                         <field name="usr" reporter:datatype="link"/>
6589                 </fields>
6590                 <links>
6591                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6592                 </links>
6593         </class>
6594         <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">
6595                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6596                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6597                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6598                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6599                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6600                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6601                 </fields>
6602                 <links>
6603                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6604                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6605                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6606                 </links>
6607         </class>
6608         <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">
6609                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6610                         <field name="field" reporter:datatype="link"/>
6611                         <field name="id" reporter:datatype="id" />
6612                         <field name="source" reporter:datatype="link"/>
6613                         <field name="value" reporter:datatype="text"/>
6614                 </fields>
6615                 <links>
6616                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6617                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6618                 </links>
6619         </class>
6620         <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">
6621                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6622                         <field name="field" reporter:datatype="link"/>
6623                         <field name="id" reporter:datatype="id" />
6624                         <field name="source" reporter:datatype="link"/>
6625                         <field name="value" reporter:datatype="text"/>
6626                 </fields>
6627                 <links>
6628                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6629                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6630                 </links>
6631         </class>
6632         <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">
6633                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6634                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6635                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6636                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6637                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6638                 </fields>
6639                 <links>
6640                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6641                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6642                 </links>
6643         </class>
6644         <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">
6645                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6646                         <field name="depth" reporter:datatype="int" />
6647                         <field name="grantable" reporter:datatype="bool"/>
6648                         <field name="grp" reporter:datatype="link"/>
6649                         <field name="id" reporter:datatype="id" />
6650                         <field name="perm" reporter:datatype="link"/>
6651                 </fields>
6652                 <links>
6653                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6654                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6655                 </links>
6656         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6657             <actions>
6658                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6659                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6660                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6661                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6662             </actions>
6663         </permacrud>
6664         </class>
6665         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6666                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6667                         <field name="items" oils_persist:virtual="true" />
6668                         <field name="btype" reporter:datatype="text"/>
6669                         <field name="id" reporter:datatype="id" />
6670                         <field name="name" reporter:datatype="text"/>
6671                         <field name="description" reporter:datatype="text"/>
6672                         <field name="owner" reporter:datatype="link"/>
6673                         <field name="pub" reporter:datatype="bool"/>
6674                         <field name="create_time" reporter:datatype="timestamp" />
6675                 </fields>
6676                 <links>
6677                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6678                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6679                 </links>
6680         </class>
6681         <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">
6682                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6683                         <field name="id" reporter:datatype="id" />
6684                         <field name="bucket" reporter:datatype="link"/>
6685                         <field name="note" reporter:datatype="text" />
6686                 </fields>
6687                 <links>
6688                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6689                 </links>
6690         </class>
6691         <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">
6692                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6693                         <field name="id" reporter:datatype="int" />
6694                         <field name="usr" reporter:datatype="link"/>
6695                         <field name="work_ou" reporter:datatype="link"/>
6696                 </fields>
6697                 <links>
6698                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6699                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6700                 </links>
6701         </class>
6702         <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">
6703                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6704                         <field name="depth" reporter:datatype="int"/>
6705                         <field name="grantable" reporter:datatype="bool"/>
6706                         <field name="id" reporter:datatype="id" />
6707                         <field name="perm" reporter:datatype="link"/>
6708                         <field name="usr" reporter:datatype="link"/>
6709                 </fields>
6710                 <links>
6711                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6712                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6713                 </links>
6714         </class>
6715         <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">
6716                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6717                         <field name="object_id" reporter:datatype="text"/>
6718                         <field name="grantable" reporter:datatype="bool"/>
6719                         <field name="id" reporter:datatype="id" />
6720                         <field name="perm" reporter:datatype="link"/>
6721                         <field name="usr" reporter:datatype="link"/>
6722                         <field name="object_type" reporter:datatype="text"/>
6723                 </fields>
6724                 <links>
6725                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6726                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6727                 </links>
6728         </class>
6729         <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">
6730                 <fields oils_persist:primary="id" oils_persist:sequence="">
6731                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6732                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6733                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6734                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6735                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6736                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6737                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6738                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6739                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6740                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6741                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6742                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6743                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6744                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6745                 </fields>
6746                 <links>
6747                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6748                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6749                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6750                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6751                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6752                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6753                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6754                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6755                 </links>
6756         </class>
6757         <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">
6758                 <fields oils_persist:primary="id" oils_persist:sequence="">
6759                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6760                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6761                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6762                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6763                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6764                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6765                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6766                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6767                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6768                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6769                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6770                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6771                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6772                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6773                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6774                 </fields>
6775                 <links>
6776                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6777                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6778                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6779                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6780                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6781                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6782                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6783                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6784                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6785                 </links>
6786         </class>
6787         <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">
6788                 <fields oils_persist:primary="id" oils_persist:sequence="">
6789                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6790                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6791                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6792                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6793                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6794                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6795                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6796                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6797                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6798                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6799                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6800                 </fields>
6801                 <links>
6802                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6803                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6804                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6805                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6806                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6807                 </links>
6808         </class>
6809         <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">
6810                 <fields oils_persist:primary="id" oils_persist:sequence="">
6811                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6812                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6813                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6814                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6815                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6816                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6817                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6818                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6819                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6820                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6821                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6822                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6823                 </fields>
6824                 <links>
6825                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6826                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6827                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6828                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6829                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6830                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6831                 </links>
6832         </class>
6833         <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">
6834                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6835                         <field name="bucket" reporter:datatype="link"/>
6836                         <field name="id" reporter:datatype="id" />
6837                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6838                         <field name="create_time" reporter:datatype="timestamp" />
6839                         <field name="pos" reporter:datatype="int" />
6840                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6841                 </fields>
6842                 <links>
6843                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6844                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6845             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6846                 </links>
6847         </class>
6848         <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">
6849                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6850                         <field name="id" reporter:datatype="id" />
6851                         <field name="item" reporter:datatype="link"/>
6852                         <field name="note" reporter:datatype="text" />
6853                 </fields>
6854                 <links>
6855                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6856                 </links>
6857         </class>
6858         <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">
6859                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6860                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6861                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6862                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6863                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6864                 </fields>
6865                 <links>
6866                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6867                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6868                 </links>
6869         </class>
6870     <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">
6871         <fields oils_persist:primary="field">
6872             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6873             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6874             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6875         </fields>
6876         <links/>
6877         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6878             <actions>
6879                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6880                 <retrieve />
6881                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6882                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6883             </actions>
6884         </permacrud>
6885     </class>
6886         <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">
6887                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6888                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6889                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6890                 </fields>
6891                 <links/>
6892         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6893             <actions>
6894                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6895                 <retrieve/>
6896                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6897                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6898             </actions>
6899         </permacrud>
6900         </class>
6901
6902
6903         <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">
6904                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6905                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6906                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6907                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6908                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6909                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6910                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6911                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6912                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6913                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6914                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6915                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6916                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6917                 </fields>
6918                 <links>
6919                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6920                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6921                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6922                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6923                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6924                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6925                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6926                 </links>
6927         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6928             <actions>
6929                 <create permission="TRANSIT_COPY">
6930                     <context link="target_copy" field="owner"/>
6931                 </create>
6932                 <retrieve/>
6933                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6934                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6935             </actions>
6936         </permacrud>
6937         </class>
6938         <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">
6939                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6940                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6941                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6942                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6943                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6944                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6945                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6946                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6947                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6948                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6949                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6950                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6951                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6952                 </fields>
6953                 <links>
6954                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6955                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6956                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6957                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6958                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6959                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6960                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6961                 </links>
6962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6963             <actions>
6964                 <create permission="TRANSIT_COPY" context_field="owner">
6965                     <context link="target_copy" field="circ_lib"/>
6966                 </create>
6967                 <retrieve/>
6968                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6969                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6970             </actions>
6971         </permacrud>
6972         </class>
6973         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6974                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6975                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6976                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6977                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6978                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6979                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6980                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6981                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6982                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6983                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6984                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6985                 </fields>
6986                 <links>
6987                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6988                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6989                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6990                 </links>
6991         </class>
6992         <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">
6993                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6994                         <field name="grp" />
6995                         <field name="id" reporter:datatype="id" />
6996                         <field name="usr" />
6997                 </fields>
6998                 <links>
6999                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7000                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7001                 </links>
7002         </class>
7003         <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">
7004                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7005                         <field name="id" reporter:datatype="id" />
7006                         <field name="fq_field" reporter:datatype="text"/>
7007                         <field name="identity_value" reporter:datatype="text"/>
7008                         <field name="translation" reporter:datatype="text"/>
7009                         <field name="string" reporter:datatype="text"/>
7010                 </fields>
7011                 <links>
7012                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7013                 </links>
7014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7015             <actions>
7016                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7017                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7018                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7019                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7020             </actions>
7021         </permacrud>
7022         </class>
7023         <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">
7024                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7025                         <field name="id" reporter:datatype="id" />
7026                         <field name="fm_class" reporter:datatype="text"/>
7027                         <field name="field" reporter:datatype="text"/>
7028                         <field name="owner" reporter:datatype="org_unit"/>
7029                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7030                 </fields>
7031                 <links>
7032                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7033                 </links>
7034         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7035             <actions>
7036                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7037                 <retrieve/>
7038                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7039                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7040             </actions>
7041         </permacrud>
7042         </class>
7043         <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">
7044                 <fields oils_persist:primary="code">
7045                         <field name="code" reporter:datatype="id" />
7046                         <field name="marc_code" reporter:datatype="text"/>
7047                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7048                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7049                 </fields>
7050                 <links/>
7051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7052             <actions>
7053                 <create permission="CREATE_LOCALE" global_required="true"/>
7054                 <retrieve/>
7055                 <update permission="UPDATE_LOCALE" global_required="true"/>
7056                 <delete permission="DELETE_LOCALE" global_required="true"/>
7057             </actions>
7058         </permacrud>
7059         </class>
7060         <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">
7061                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7062                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7063                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7064                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7065             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7066                 </fields>
7067                 <links>
7068                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7069                 </links>
7070         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7071             <actions>
7072                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7073                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7074                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7075                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7076             </actions>
7077         </permacrud>
7078         </class>
7079
7080         <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">
7081                 <fields oils_persist:primary="id">
7082                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7083                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7084                 </fields>
7085                 <links/>
7086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7087             <actions>
7088                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7089                 <retrieve/>
7090                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7091                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7092             </actions>
7093         </permacrud>
7094         </class>
7095
7096         <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">
7097                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7098                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7099                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7100                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7101                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7102                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7103                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7104                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7105                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7106                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7107                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7108                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7109                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7110                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7111                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7112                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7113                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7114                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7115                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7116                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7117                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7118                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7119                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7120                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7121                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7122                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7123                 </fields>
7124                 <links>
7125                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7126                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7127                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7128                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7129                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7130                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7131                 </links>
7132         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7133             <actions>
7134                 <create permission="user_request.create">
7135                     <context link="usr" field="home_ou"/>
7136                                 </create>
7137                 <retrieve permission="user_request.view">
7138                     <context link="usr" field="home_ou"/>
7139                                 </retrieve>
7140                 <update permission="user_request.update">
7141                     <context link="usr" field="home_ou"/>
7142                                 </update>
7143                 <delete permission="user_request.delete">
7144                     <context link="usr" field="home_ou"/>
7145                                 </delete>
7146             </actions>
7147         </permacrud>
7148         </class>
7149
7150         <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">
7151                 <fields oils_persist:primary="code">
7152                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7153                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7154                 </fields>
7155                 <links/>
7156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7157             <actions>
7158                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7159                 <retrieve/>
7160                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7161                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7162             </actions>
7163         </permacrud>
7164         </class>
7165
7166         <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">
7167                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7168                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7169                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7170                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7171                         <field reporter:label="Ratio" name="ratio" />
7172                 </fields>
7173                 <links>
7174                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7175                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7176                 </links>
7177                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7178                         <actions>
7179                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7180                                 <retrieve/>
7181                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7182                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7183                         </actions>
7184                 </permacrud>
7185         </class>
7186
7187         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7188                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7189                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7190                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7191                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7192                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7193                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7194                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7195                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7196                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7197                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7198                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7199                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7200                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7201                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7202                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7203                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7204                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7205                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7206                 </fields>
7207                 <links>
7208                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7209                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7210             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7211             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7212             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7213                 </links>
7214         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7215             <actions>
7216                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7217                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7218                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7219                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7220             </actions>
7221         </permacrud>
7222         </class>
7223
7224         <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">
7225                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7226                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7227                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7228                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7229                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7230                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7231                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7232                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7233                 </fields>
7234                 <links>
7235                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7236                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7237                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7238                 </links>
7239         </class>
7240
7241         <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">
7242                 <fields oils_persist:primary="code">
7243                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7244                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7245                 </fields>
7246                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7247             <actions>
7248                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7249                 <retrieve/>
7250                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7251                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7252             </actions>
7253                 </permacrud>
7254         </class>
7255
7256         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7257                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7258                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7259                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7260                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7261                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7262                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7263                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7264                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7265                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7266                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7267                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7268                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7269                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7270                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7271                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7272                 </fields>
7273                 <links>
7274                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7275                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7276                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7277                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7278                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7279                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7280                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7281                 </links>
7282         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7283             <actions>
7284                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7285                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7286                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7287                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7288             </actions>
7289         </permacrud>
7290         </class>
7291
7292         <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">
7293                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7294                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7295                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7296                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7297                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7298                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7299                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7300                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7301                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7302                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7303                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7304                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7305                 </fields>
7306                 <links>
7307                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7308                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7309                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7310                 </links>
7311         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7312             <actions>
7313                 <create   permission="ADMIN_INVOICE">
7314                                         <context link="invoice" field="receiver"/>
7315                                 </create>
7316                 <retrieve permission="ADMIN_INVOICE">
7317                                         <context link="invoice" field="receiver"/>
7318                                 </retrieve>
7319                 <update   permission="ADMIN_INVOICE">
7320                                         <context link="invoice" field="receiver"/>
7321                                 </update>
7322                                 <delete   permission="ADMIN_INVOICE">
7323                                         <context link="invoice" field="receiver"/>
7324                                 </delete>
7325             </actions>
7326         </permacrud>
7327         </class>
7328
7329         <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">
7330                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7331                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7332                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7333                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7334                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7335                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7336                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7337                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7338                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7339                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7340                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7341                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7342                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7343                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7344                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7345                 </fields>
7346                 <links>
7347                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7348                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7349                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7350                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7351                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7352                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7353                 </links>
7354         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7355             <actions>
7356                 <create   permission="ADMIN_INVOICE">
7357                                         <context link="invoice" field="receiver"/>
7358                                 </create>
7359                 <retrieve permission="ADMIN_INVOICE">
7360                                         <context link="invoice" field="receiver"/>
7361                                 </retrieve>
7362                 <update   permission="ADMIN_INVOICE">
7363                                         <context link="invoice" field="receiver"/>
7364                                 </update>
7365                                 <delete   permission="ADMIN_INVOICE">
7366                                         <context link="invoice" field="receiver"/>
7367                                 </delete>
7368             </actions>
7369         </permacrud>
7370         </class>
7371
7372         <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">
7373                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7374                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7375                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7376                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7377                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7378                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7379                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7380                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7381                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7382                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7383                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7384                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7385                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7386                 </fields>
7387                 <links>
7388                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7389                 </links>
7390         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7391             <actions>
7392                 <create permission="ADMIN_PROVIDER">
7393                     <context link="provider" field="owner"/>
7394                 </create>
7395                 <retrieve permission="ADMIN_PROVIDER">
7396                     <context link="provider" field="owner"/>
7397                 </retrieve>
7398                 <update permission="ADMIN_PROVIDER">
7399                     <context link="provider" field="owner"/>
7400                 </update>
7401                 <delete permission="ADMIN_PROVIDER">
7402                     <context link="provider" field="owner"/>
7403                 </delete>
7404             </actions>
7405         </permacrud>
7406         </class>
7407
7408         <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">
7409                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7410                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7411                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7412                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7413                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7414                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7415                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7416         </fields>
7417                 <links>
7418                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7419                 </links>
7420         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7421             <actions>
7422                 <create permission="ADMIN_PROVIDER">
7423                     <context link="provider" field="owner"/>
7424                 </create>
7425                 <retrieve permission="ADMIN_PROVIDER">
7426                     <context link="provider" field="owner"/>
7427                 </retrieve>
7428                 <update permission="ADMIN_PROVIDER">
7429                     <context link="provider" field="owner"/>
7430                 </update>
7431                 <delete permission="ADMIN_PROVIDER">
7432                     <context link="provider" field="owner"/>
7433                 </delete>
7434             </actions>
7435         </permacrud>
7436     </class>
7437         <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">
7438                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7439                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7440                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7441                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7442                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7443                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7444                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7445                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7446                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7447                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7448                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7449                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7450                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7451                 </fields>
7452                 <links>
7453                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7454                 </links>
7455         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7456             <actions>
7457                 <create permission="ADMIN_PROVIDER">
7458                     <context link="contact" jump='provider' field="owner"/>
7459                 </create>
7460                 <retrieve permission="ADMIN_PROVIDER">
7461                     <context link="contact" jump='provider' field="owner"/>
7462                 </retrieve>
7463                 <update permission="ADMIN_PROVIDER">
7464                     <context link="contact" jump='provider' field="owner"/>
7465                 </update>
7466                 <delete permission="ADMIN_PROVIDER">
7467                     <context link="contact" jump='provider' field="owner"/>
7468                 </delete>
7469             </actions>
7470         </permacrud>
7471         </class>
7472
7473         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7474                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7475                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7476                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7477                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7478                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7479                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7480                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7481                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7482                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7483                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7484                 </fields>
7485                 <links>
7486                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7487                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7488                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7489                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7490                 </links>
7491         </class>
7492
7493         <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">
7494                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7495                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7496                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7497                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7498                 </fields>
7499                 <links>
7500             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7501                 </links>
7502                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7503                         <actions>
7504                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7505                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7506                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7507                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7508                         </actions>
7509                 </permacrud>
7510         </class>
7511
7512         <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">
7513                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7514                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7515                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7516                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7517                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7518                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7519                 </fields>
7520                 <links>
7521                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7522                 </links>
7523                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7524                         <actions>
7525                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7526                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7527                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7528                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7529                         </actions>
7530                 </permacrud>
7531         </class>
7532
7533         <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">
7534                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7535                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7536                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7537                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7538                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7539                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7540                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7541                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7542                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7543                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7544                 </fields>
7545                 <links>
7546                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7547                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7548             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7549             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7550                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7551                 </links>
7552         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7553             <actions>
7554                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7555                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7556                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7557                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7558             </actions>
7559         </permacrud>
7560         </class>
7561
7562         <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">
7563                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7564                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7565                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7566                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7567                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7568                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7569                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7570                 </fields>
7571                 <links>
7572                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7573                 </links>
7574                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7575                         <actions>
7576                                 <create permission="ADMIN_FUNDING_SOURCE">
7577                     <context link="funding_source" field="owner"/>
7578                 </create>
7579                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7580                     <context link="funding_source" field="owner"/>
7581                 </retrieve>
7582                                 <update permission="ADMIN_FUNDING_SOURCE">
7583                     <context link="funding_source" field="owner"/>
7584                 </update>
7585                                 <delete permission="ADMIN_FUNDING_SOURCE">
7586                     <context link="funding_source" field="owner"/>
7587                 </delete>
7588                         </actions>
7589                 </permacrud>
7590         </class>
7591
7592         <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">
7593                 <fields oils_persist:primary="id">
7594                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7595                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7596                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7597                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7598                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7599                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7600                 </fields>
7601                 <links>
7602                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7603                 </links>
7604         </class>
7605
7606         <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">
7607                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7608                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7609                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7610                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7611                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7612                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7613                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7614                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7615                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7616                 </fields>
7617                 <links>
7618                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7619                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7620                 </links>
7621                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7622                         <actions>
7623                                 <create permission="ADMIN_ACQ_FUND">
7624                     <context link="fund" field="org"/>
7625                 </create>
7626                                 <retrieve permission="ADMIN_ACQ_FUND">
7627                     <context link="fund" field="org"/>
7628                 </retrieve>
7629                                 <update permission="ADMIN_ACQ_FUND">
7630                     <context link="fund" field="org"/>
7631                 </update>
7632                                 <delete permission="ADMIN_ACQ_FUND">
7633                     <context link="fund" field="org"/>
7634                 </delete>
7635                         </actions>
7636                 </permacrud>
7637         </class>
7638
7639         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7640                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7641                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7642                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7643                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7644                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7645                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7646                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7647                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7648                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7649                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7650                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7651                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7652                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7653                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7654                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7655                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7656                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7657                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7658                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7659                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7660                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7661                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7662                 </fields>
7663                 <links>
7664                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7665                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7666             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7667             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7668             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7669             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7670             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7671             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7672             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7673             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7674             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7675                 </links>
7676         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7677             <actions>
7678                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7679                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7680                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7681                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7682             </actions>
7683         </permacrud>
7684         </class>
7685
7686         <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">
7687                 <fields oils_persist:primary="fund">
7688                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7689                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7690                 </fields>
7691                 <links>
7692                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7693                 </links>
7694         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7695             <actions>
7696                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7697                                         <context link="fund" field="org" />
7698                 </retrieve>
7699             </actions>
7700         </permacrud>
7701         </class>
7702
7703         <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">
7704                 <fields oils_persist:primary="fund">
7705                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7706                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7707                 </fields>
7708                 <links>
7709                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7710                 </links>
7711         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7712             <actions>
7713                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7714                                         <context link="fund" field="org" />
7715                 </retrieve>
7716             </actions>
7717         </permacrud>
7718         </class>
7719
7720         <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">
7721                 <fields oils_persist:primary="fund">
7722                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7723                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7724                 </fields>
7725                 <links>
7726                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7727                 </links>
7728         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7729             <actions>
7730                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7731                                         <context link="fund" field="org" />
7732                 </retrieve>
7733             </actions>
7734         </permacrud>
7735         </class>
7736
7737         <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">
7738                 <fields oils_persist:primary="fund">
7739                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7740                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7741                 </fields>
7742                 <links>
7743                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7744                 </links>
7745         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7746             <actions>
7747                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7748                                         <context link="fund" field="org" />
7749                 </retrieve>
7750             </actions>
7751         </permacrud>
7752         </class>
7753
7754         <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">
7755                 <fields oils_persist:primary="fund">
7756                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7757                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7758                 </fields>
7759                 <links>
7760                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7761                 </links>
7762         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7763             <actions>
7764                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7765                                         <context link="fund" field="org" />
7766                 </retrieve>
7767             </actions>
7768         </permacrud>
7769         </class>
7770
7771    <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">
7772         <fields oils_persist:primary="fund">
7773             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7774             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7775         </fields>
7776         <links>
7777             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7778         </links>
7779     </class>
7780
7781    <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">
7782         <fields oils_persist:primary="fund">
7783             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7784             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7785         </fields>
7786         <links>
7787             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7788         </links>
7789     </class>
7790
7791    <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">
7792         <fields oils_persist:primary="fund">
7793             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7794             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7795         </fields>
7796         <links>
7797             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7798         </links>
7799     </class>
7800
7801    <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">
7802         <fields oils_persist:primary="fund">
7803             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7804             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7805         </fields>
7806         <links>
7807             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7808         </links>
7809     </class>
7810
7811    <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">
7812         <fields oils_persist:primary="fund">
7813             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7814             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7815         </fields>
7816         <links>
7817             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7818         </links>
7819     </class>
7820
7821         <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">
7822                 <fields oils_persist:primary="funding_source">
7823                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7824                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7825                 </fields>
7826                 <links>
7827                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7828                 </links>
7829         </class>
7830
7831         <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">
7832                 <fields oils_persist:primary="funding_source">
7833                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7834                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7835                 </fields>
7836                 <links>
7837                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7838                 </links>
7839         </class>
7840
7841         <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">
7842                 <fields oils_persist:primary="funding_source">
7843                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7844                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7845                 </fields>
7846                 <links>
7847                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7848                 </links>
7849         </class>
7850
7851         <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">
7852                 <fields oils_persist:primary="fund">
7853                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7854                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7855                 </fields>
7856                 <links>
7857                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7858                 </links>
7859         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7860             <actions>
7861                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7862                                         <context link="fund" field="org" />
7863                 </retrieve>
7864             </actions>
7865         </permacrud>
7866     </class>
7867     <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">
7868         <oils_persist:source_definition><![CDATA[
7869             SELECT
7870                 acqf.*,
7871                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7872                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7873                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7874                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7875             FROM
7876                 acq.fund acqf
7877                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7878                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7879                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7880                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7881         ]]></oils_persist:source_definition>
7882         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7883             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7884             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7885             <field reporter:label="Name" name="name" reporter:datatype="text" />
7886             <field reporter:label="Year" name="year" reporter:datatype="int" />
7887             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7888             <field reporter:label="Code" name="code" reporter:datatype="text" />
7889             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7890             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7891             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7892             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7893             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7894
7895             <!-- non fund-native fields -->
7896             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7897             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7898             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7899             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7900         </fields>
7901         <links>
7902             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7903             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7904             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7905         </links>
7906         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7907             <actions>
7908                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7909             </actions>
7910         </permacrud>
7911         </class>
7912         <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">
7913                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7914                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7915                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7916                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7917                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7918                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7919                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7920                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7921                 </fields>
7922                 <links>
7923                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7924                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7925                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7926                 </links>
7927                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7928                         <actions>
7929                                 <create permission="ADMIN_ACQ_FUND">
7930                     <context link="fund" field="org"/>
7931                 </create>
7932                                 <retrieve permission="ADMIN_ACQ_FUND">
7933                     <context link="fund" field="org"/>
7934                 </retrieve>
7935                                 <update permission="ADMIN_ACQ_FUND">
7936                     <context link="fund" field="org"/>
7937                 </update>
7938                                 <delete permission="ADMIN_ACQ_FUND">
7939                     <context link="fund" field="org"/>
7940                 </delete>
7941                         </actions>
7942                 </permacrud>
7943         </class>
7944
7945     <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">
7946         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7947             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7948             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7949             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7950             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7951             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7952             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7953             <field reporter:label="Note" name="note" reporter:datatype="text" />
7954             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7955         </fields>
7956         <links>
7957             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7958             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7959             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7960         </links>
7961                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7962                         <actions>
7963                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7964                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7965                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7966                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7967                         </actions>
7968                 </permacrud>
7969     </class>
7970
7971         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7972                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7973                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7974                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7975                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7976                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7977                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7978                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7979                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7980                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7981                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7982                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7983                 </fields>
7984                 <links>
7985                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7986                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7987                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7988                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7989                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7990                 </links>
7991                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7992                         <actions>
7993                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7994                         </actions>
7995                 </permacrud>
7996         </class>
7997
7998         <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">
7999                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8000                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8001                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8002                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8003                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8004                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8005                 </fields>
8006                 <links>
8007                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8008                 </links>
8009                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8010                         <actions>
8011                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8012                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8013                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8014                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8015                         </actions>
8016                 </permacrud>
8017         </class>
8018
8019         <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">
8020                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8021                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8022                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8023                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8024                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8025                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8026                         <field reporter:label="State" name="state" reporter:datatype="text" />
8027                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8028                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8029                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8030                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8031                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8032                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8033                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8034                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8035                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8036                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8037                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8038                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8039                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8040                 </fields>
8041                 <links>
8042                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8043                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8044                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8045                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8046                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8047                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8048                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8049                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8050                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8051                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8052                 </links>
8053                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8054                         <actions>
8055                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8056                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8057                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8058                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8059                         </actions>
8060                 </permacrud>
8061         </class>
8062
8063         <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">
8064                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8065                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8066                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8067                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8068                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8069                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8070                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8071                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8072                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8073                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8074                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8075                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8076                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8077                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8078                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8079                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8080                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8081                 </fields>
8082                 <links>
8083                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8084                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8085                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8086                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8087                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8088                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8089                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8090                 </links>
8091                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8092             <actions>
8093                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8094             </actions>
8095                 </permacrud>
8096         </class>
8097
8098         <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">
8099                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8100                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8101                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8102                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8103                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8104                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8105                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8106                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8107                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8108                 </fields>
8109                 <links>
8110                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8111                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8112                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8113                 </links>
8114                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8115             <actions>
8116                 <create permission="CREATE_PURCHASE_ORDER">
8117                     <context link="purchase_order" field="ordering_agency"/>
8118                 </create>
8119                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8120                     <context link="purchase_order" field="ordering_agency"/>
8121                 </retrieve>
8122                 <update permission="CREATE_PURCHASE_ORDER">
8123                     <context link="purchase_order" field="ordering_agency"/>
8124                 </update>
8125                 <delete permission="CREATE_PURCHASE_ORDER">
8126                     <context link="purchase_order" field="ordering_agency"/>
8127                 </delete>
8128             </actions>
8129                 </permacrud>
8130         </class>
8131
8132         <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">
8133                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8134                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8135                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8136                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8137                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8138                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8139                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8140                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8141                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8142                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8143                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8144                 </fields>
8145                 <links>
8146                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8147                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8148                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8149                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8150                 </links>
8151                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8152             <actions>
8153                 <create permission="CREATE_PURCHASE_ORDER">
8154                     <context link="purchase_order" field="ordering_agency"/>
8155                 </create>
8156                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8157                     <context link="purchase_order" field="ordering_agency"/>
8158                 </retrieve>
8159                 <update permission="CREATE_PURCHASE_ORDER">
8160                     <context link="purchase_order" field="ordering_agency"/>
8161                 </update>
8162                 <delete permission="CREATE_PURCHASE_ORDER">
8163                     <context link="purchase_order" field="ordering_agency"/>
8164                 </delete>
8165             </actions>
8166                 </permacrud>
8167         </class>
8168
8169         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8170                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8171                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8172                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8173                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8174                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8175                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8176                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8177                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8178                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8179                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8180                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8181                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8182                         <field reporter:label="State" name="state" reporter:datatype="text" />
8183                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8184                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8185                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8186                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8187                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8188                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8189                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8190                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8191                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8192                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8193                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8194                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8195                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8196                 </fields>
8197                 <links>
8198                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8199                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8200                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8201                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8202                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8203                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8204                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8205                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8206                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8207                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8208                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8209                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8210                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8211                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8212                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8213                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8214                 </links>
8215                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8216                         <actions>
8217                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8218                                         <context link="purchase_order" field="ordering_agency"/>
8219                                         <context link="picklist" field="org_unit"/>
8220                                 </retrieve>
8221                         </actions>
8222                 </permacrud>
8223         </class>
8224
8225         <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">
8226                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8227                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8228                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8229                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8230                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8231                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8232                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8233                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8234                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8235                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8236                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8237                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8238                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8239                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8240                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8241                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8242                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8243                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8244                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8245                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8246                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8247                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8248                 </fields>
8249                 <links>
8250                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8251                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8252                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8253                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8254                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8255                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8256                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8257                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8258                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8259                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8260                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8261                 </links>
8262                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8263                         <actions>
8264                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8265                                         <context link="purchase_order" field="ordering_agency"/>
8266                                         <context link="picklist" field="org_unit"/>
8267                                 </retrieve>
8268                         </actions>
8269                 </permacrud>
8270         </class>
8271
8272         <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">
8273                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8274                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8275                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8276                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8277                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8278                 </fields>
8279                 <links>
8280                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8281                 </links>
8282                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8283                         <actions>
8284                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8285                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8286                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8287                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8288                         </actions>
8289                 </permacrud>
8290         </class>
8291
8292         <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">
8293                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8294                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8295                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8296                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8297                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8298                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8299                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8300                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8301                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8302                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8303                 </fields>
8304                 <links>
8305                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8306                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8307                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8308                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8309                 </links>
8310         </class>
8311
8312         <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">
8313                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8314                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8315                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8316                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8317                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8318                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8319                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8320                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8321                 </fields>
8322                 <links>
8323                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8324                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8325                 </links>
8326         </class>
8327
8328         <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">
8329                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8330                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8331                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8332                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8333                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8334                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8335                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8336                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8337                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8338                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8339                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8340                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8341                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8342                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8343                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8344                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8345                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8346                 </fields>
8347                 <links>
8348                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8349                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8350                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8351                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8352                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8353                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8354                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8355                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8356                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8357                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8358                 </links>
8359         </class>
8360
8361         <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">
8362                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8363                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8364                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8365                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8366                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8367                 </fields>
8368                 <links/>
8369                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8370                         <actions>
8371                                 <retrieve />
8372                         </actions>
8373                 </permacrud>
8374         </class>
8375
8376         <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">
8377                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8378                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8379                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8380                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8381                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8382                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8383             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8384                 </fields>
8385                 <links/>
8386         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8387             <actions>
8388                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8389                 <retrieve />
8390                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8391                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8392             </actions>
8393         </permacrud>
8394         </class>
8395
8396         <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">
8397                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8398                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8399                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8400                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8401                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8402                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8403                 </fields>
8404                 <links/>
8405         </class>
8406         <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">
8407                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8408                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8409                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8410                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8411                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8412                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8413                 </fields>
8414                 <links>
8415                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8416                 </links>
8417         </class>
8418
8419         <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">
8420             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8421                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8422                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8423                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8424                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8425                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8426                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8427         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8428
8429             </fields>
8430             <links>
8431                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8432             </links>
8433             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8434                 <actions>
8435                     <create permission="ADMIN_PROVIDER">
8436                         <context link="provider" field="owner"/>
8437                     </create>
8438                     <retrieve permission="ADMIN_PROVIDER">
8439                         <context link="provider" field="owner"/>
8440                     </retrieve>
8441                     <update permission="ADMIN_PROVIDER">
8442                         <context link="provider" field="owner"/>
8443                     </update>
8444                     <delete permission="ADMIN_PROVIDER">
8445                         <context link="provider" field="owner"/>
8446                     </delete>
8447                 </actions>
8448             </permacrud>
8449         </class>
8450         
8451         <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">
8452             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8453                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8454                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8455                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8456                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8457             </fields>
8458             <links>
8459                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8460             </links>
8461             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8462                 <actions>
8463                     <create permission="ADMIN_PROVIDER">
8464                         <context link="provider" field="owner"/>
8465                     </create>
8466                     <retrieve permission="ADMIN_PROVIDER">
8467                         <context link="provider" field="owner"/>
8468                     </retrieve>
8469                     <update permission="ADMIN_PROVIDER">
8470                         <context link="provider" field="owner"/>
8471                     </update>
8472                     <delete permission="ADMIN_PROVIDER">
8473                         <context link="provider" field="owner"/>
8474                     </delete>
8475                 </actions>
8476             </permacrud>
8477         </class>
8478         
8479         <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">
8480             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8481                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8482                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8483                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8484                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8485                 </fields>
8486                 <links/>
8487         </class>
8488
8489         <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">
8490                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8491                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8492                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8493                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8494                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8495                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8496                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8497                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8498                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8499                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8500                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8501                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8502                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8503                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8504                 </fields>
8505                 <links>
8506                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8507                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8508                 </links>
8509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8510             <actions>
8511                 <create permission="ADMIN_PROVIDER">
8512                     <context link="provider" field="owner"/>
8513                 </create>
8514                 <retrieve permission="ADMIN_PROVIDER">
8515                     <context link="provider" field="owner"/>
8516                 </retrieve>
8517                 <update permission="ADMIN_PROVIDER">
8518                     <context link="provider" field="owner"/>
8519                 </update>
8520                 <delete permission="ADMIN_PROVIDER">
8521                     <context link="provider" field="owner"/>
8522                 </delete>
8523             </actions>
8524         </permacrud>
8525         </class>
8526
8527         <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">
8528                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8529                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8530                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8531                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8532                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8533                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8534                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8535                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8536                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8537                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8538                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8539                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8540                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8541                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8542                 </fields>
8543                 <links>
8544                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8545                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8546                 </links>
8547         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8548             <actions>
8549                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8550                     <context link="account" jump="provider" field="owner"/>
8551                 </retrieve>
8552                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8553                     <context link="account" jump="provider" field="owner"/>
8554                 </update>
8555                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8556                     <context link="account" jump="provider" field="owner"/>
8557                 </delete>
8558             </actions>
8559         </permacrud>
8560         </class>
8561
8562
8563         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8564                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8565                         <field name="id" reporter:datatype="id" />
8566                         <field name="parent" reporter:datatype="link"/>
8567                         <field name="owner" reporter:datatype="link"/>
8568                         <field name="create_time" reporter:datatype="timestamp"/>
8569                         <field name="name" reporter:datatype="text"/>
8570                         <field name="shared" reporter:datatype="bool"/>
8571                         <field name="share_with" reporter:datatype="link"/>
8572                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8573                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8574                 </fields>
8575                 <links>
8576                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8577                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8578                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8579                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8580                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8581                 </links>
8582         </class>
8583         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8584                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8585                         <field name="id" reporter:datatype="id" />
8586                         <field name="parent" reporter:datatype="link"/>
8587                         <field name="owner" reporter:datatype="link"/>
8588                         <field name="create_time" reporter:datatype="timestamp"/>
8589                         <field name="name" reporter:datatype="text"/>
8590                         <field name="shared" reporter:datatype="bool"/>
8591                         <field name="share_with" reporter:datatype="link"/>
8592                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8593                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8594                 </fields>
8595                 <links>
8596                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8597                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8598                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8599                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8600                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8601                 </links>
8602         </class>
8603         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8604                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8605                         <field name="id" reporter:datatype="id" />
8606                         <field name="parent" reporter:datatype="link"/>
8607                         <field name="owner" reporter:datatype="link"/>
8608                         <field name="create_time" reporter:datatype="timestamp"/>
8609                         <field name="name" reporter:datatype="text"/>
8610                         <field name="shared" reporter:datatype="bool"/>
8611                         <field name="share_with" reporter:datatype="link"/>
8612                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8613                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8614                 </fields>
8615                 <links>
8616                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8617                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8618                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8619                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8620                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8621                 </links>
8622         </class>
8623         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8624                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8625                         <field name="id" reporter:datatype="id" />
8626                         <field name="owner" reporter:datatype="link"/>
8627                         <field name="create_time" reporter:datatype="timestamp"/>
8628                         <field name="name" reporter:datatype="text"/>
8629                         <field name="data" reporter:datatype="text"/>
8630                         <field name="folder" reporter:datatype="link"/>
8631                         <field name="description" reporter:datatype="text"/>
8632                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8633                 </fields>
8634                 <links>
8635                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8636                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8637                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8638                 </links>
8639         </class>
8640         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8641                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8642                         <field name="id" reporter:datatype="id" />
8643                         <field name="owner" reporter:datatype="link"/>
8644                         <field name="create_time" reporter:datatype="timestamp"/>
8645                         <field name="template" reporter:datatype="link"/>
8646                         <field name="data" reporter:datatype="text"/>
8647                         <field name="folder" reporter:datatype="link"/>
8648                         <field name="recur" reporter:datatype="bool"/>
8649                         <field name="recurrence" reporter:datatype="interval"/>
8650                         <field name="name" reporter:datatype="text"/>
8651                         <field name="description" reporter:datatype="text"/>
8652                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8653                 </fields>
8654                 <links>
8655                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8656                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8657                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8658                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8659                 </links>
8660         </class>
8661         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8662                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8663                         <field name="id" reporter:datatype="id" />
8664                         <field name="runner" reporter:datatype="link"/>
8665                         <field name="start_time" reporter:datatype="timestamp"/>
8666                         <field name="complete_time" reporter:datatype="timestamp"/>
8667                         <field name="run_time" reporter:datatype="timestamp"/>
8668                         <field name="email" reporter:datatype="text"/>
8669                         <field name="excel_format" reporter:datatype="bool"/>
8670                         <field name="csv_format" reporter:datatype="bool"/>
8671                         <field name="html_format" reporter:datatype="bool"/>
8672                         <field name="error_code" reporter:datatype="int"/>
8673                         <field name="error_text" reporter:datatype="text"/>
8674                         <field name="report" reporter:datatype="link"/>
8675                         <field name="folder" reporter:datatype="link"/>
8676                         <field name="chart_pie" reporter:datatype="bool"/>
8677                         <field name="chart_bar" reporter:datatype="bool"/>
8678                         <field name="chart_line" reporter:datatype="bool"/>
8679                 </fields>
8680                 <links>
8681                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8682                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8683                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8684                 </links>
8685         </class>
8686         <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">
8687                 <fields oils_persist:primary="id">
8688                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8689                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8690                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8691                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8692                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8693                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8694                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8695                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8696                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8697                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8698                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8699                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8700                 </fields>
8701                 <links>
8702                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8703                 </links>
8704                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8705                         <actions>
8706                                 <retrieve />
8707                         </actions>
8708                 </permacrud>
8709         </class>
8710         <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">
8711                 <fields oils_persist:primary="id">
8712                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8713                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8714                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8715                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8716                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8717                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8718                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8719                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8720                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8721                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8722                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8723                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8724                 </fields>
8725                 <links>
8726                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8727                 </links>
8728         </class>
8729         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8730                 <fields oils_persist:primary="id">
8731                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8732                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8733                         <field reporter:label="Fingerprint" name="fingerprint" />
8734                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8735                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8736                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8737                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8738                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8739                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8740                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8741                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8742                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8743                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8744                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8745                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8746                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8747                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8748                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8749                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8750                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8751                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8752                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8753                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8754                 </fields>
8755                 <links>
8756                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8757                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8758                 </links>
8759         </class>
8760         <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">
8761                 <fields oils_persist:primary="id">
8762                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8763                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8764                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8765                 </fields>
8766                 <links>
8767                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8768                 </links>
8769         </class>
8770         <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">
8771                 <fields oils_persist:primary="id">
8772                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8773                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8774                 </fields>
8775                 <links>
8776                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8777                 </links>
8778         </class>
8779         <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">
8780                 <fields oils_persist:primary="id">
8781                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8782                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8783                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8784                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8785                 </fields>
8786                 <links>
8787                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8788                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8789                 </links>
8790         </class>
8791         <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">
8792                 <fields oils_persist:primary="xact">
8793                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8794                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8795                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8796                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8797                 </fields>
8798                 <links>
8799                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8800                 </links>
8801         </class>
8802         <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">
8803                 <fields oils_persist:primary="xact">
8804                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8805                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8806                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8807                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8808                 </fields>
8809                 <links>
8810                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8811                 </links>
8812         </class>
8813         <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)">
8814                 <fields oils_persist:primary="id">
8815                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8816                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8817                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8818                 </fields>
8819                 <links>
8820                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8821                 </links>
8822         </class>
8823         <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">
8824                 <fields oils_persist:primary="id">
8825                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8826                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8827                 </fields>
8828                 <links>
8829                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8830                 </links>
8831         </class>
8832         <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">
8833                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8834                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
8835                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8836                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8837                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8838                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8839                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8840                 </fields>
8841                 <links>
8842                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8843                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8844                 </links>
8845                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8846                         <actions>
8847                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8848                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8849                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8850                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8851                         </actions>
8852                 </permacrud>
8853         </class>
8854         <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">
8855                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8856                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8857                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8858                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8859                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8860                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8861                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8862                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8863                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
8864                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
8865                 </fields>
8866                 <links>
8867                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8868                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8869                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8870                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8871                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8872                 </links>
8873                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8874                         <actions>
8875                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8876                                         <context link="formula" field="owner"/>
8877                                 </create>
8878                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8879                                         <context link="formula" field="owner"/>
8880                                 </retrieve>
8881                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8882                                         <context link="formula" field="owner"/>
8883                                 </update>
8884                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8885                                         <context link="formula" field="owner"/>
8886                                 </delete>
8887                         </actions>
8888                 </permacrud>
8889         </class>
8890
8891         <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">
8892                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8893                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8894                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8895                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8896                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8897                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8898                 </fields>
8899                 <links>
8900                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8901                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8902                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8903                 </links>
8904                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8905                         <actions>
8906                                 <create permission="CREATE_PURCHASE_ORDER">
8907                                         <context link="formula" field="owner"/>
8908                 </create>
8909                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8910                                         <context link="formula" field="owner"/>
8911                 </retrieve>
8912                                 <update permission="CREATE_PURCHASE_ORDER">
8913                                         <context link="formula" field="owner"/>
8914                 </update>
8915                                 <delete permission="CREATE_PURCHASE_ORDER">
8916                                         <context link="formula" field="owner"/>
8917                 </delete>
8918                         </actions>
8919                 </permacrud>
8920         </class>
8921
8922         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8923                 <fields oils_persist:primary="id">
8924                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8925                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8926                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8927                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8928                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8929                 </fields>
8930                 <links>
8931                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8932                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8933                 </links>
8934         </class>
8935
8936         <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">
8937                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8938                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8939                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8940                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8941                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8942                 </fields>
8943                 <links>
8944                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8945                 </links>
8946                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8947                         <actions>
8948                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8949                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8950                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8951                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8952                         </actions>
8953                 </permacrud>
8954         </class>
8955
8956         <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">
8957                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8958                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8959                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8960                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8961                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8962                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8963                 </fields>
8964                 <links>
8965                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8966                 </links>
8967                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8968                         <actions>
8969                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8970                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8971                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8972                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8973                         </actions>
8974                 </permacrud>
8975         </class>
8976
8977         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8978                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8979                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8980                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8981                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8982                 </fields>
8983                 <links>
8984                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8985                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8986                 </links>
8987         </class>
8988
8989         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8990                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8991                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8992                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8993                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8994                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8995                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8996                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8997                 </fields>
8998                 <links>
8999                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9000                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9001                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9002                 </links>
9003         </class>
9004
9005         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9006                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9007                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9008                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9009                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9010                 </fields>
9011                 <links>
9012                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9013                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9014                 </links>
9015         </class>
9016
9017         <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">
9018                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9019                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9020                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9021                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9022                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9023                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9024                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9025                 </fields>
9026                 <links>
9027                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9028                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9029                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9030                 </links>
9031         </class>
9032
9033         <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">
9034                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9035                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9036                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9037                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9038                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9039                 </fields>
9040                 <links>
9041                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9042                 </links>
9043                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9044             <actions>
9045                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9046                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9047                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9048                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9049             </actions>
9050                 </permacrud>
9051         </class>
9052
9053         <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">
9054                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9055                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9056                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9057                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9058                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9059                 </fields>
9060                 <links>
9061                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9062                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9063                 </links>
9064                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9065                         <actions>
9066                                 <create permission="ADMIN_CLAIM_POLICY">
9067                                         <context link="claim_policy" field="org_unit"/>
9068                 </create>
9069                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9070                                         <context link="claim_policy" field="org_unit"/>
9071                 </retrieve>
9072                                 <update permission="ADMIN_CLAIM_POLICY">
9073                                         <context link="claim_policy" field="org_unit"/>
9074                 </update>
9075                                 <delete permission="ADMIN_CLAIM_POLICY">
9076                                         <context link="claim_policy" field="org_unit"/>
9077                 </delete>
9078                         </actions>
9079                 </permacrud>
9080         </class>
9081
9082     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9083         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9084             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9085             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9086             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9087             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9088             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9089             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9090             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9091             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9092             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9093             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9094             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9095             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9096             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9097             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9098             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9099             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9100         </fields>
9101         <links>
9102             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9103         </links>
9104     </class>
9105
9106     <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">
9107         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9108             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9109             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9110             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9111             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9112             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9113         </fields>
9114     </class>
9115
9116     <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">
9117         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9118             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9119             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9120             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9121             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9122             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9123             <field reporter:label="City" name="city" reporter:datatype="text"/>
9124             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9125             <field reporter:label="State" name="state" reporter:datatype="text"/>
9126             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9127             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9128             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9129         </fields>
9130     </class>
9131
9132     <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">
9133         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9134             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9135             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9136             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9137             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9138             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9139             <field reporter:label="City" name="city" reporter:datatype="text"/>
9140             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9141             <field reporter:label="State" name="state" reporter:datatype="text"/>
9142             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9143             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9144             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9145         </fields>
9146     </class>
9147
9148     <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">
9149         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9150             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9151             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9152             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9153             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9154             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9155             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9156         </fields>
9157     </class>
9158
9159         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9160                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9161                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9162                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9163                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9164                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9165                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9166                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9167                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9168                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9169                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9170                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9171                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9172                 </fields>
9173                 <links>
9174                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9175                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9176                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9177                 </links>
9178         </class>
9179
9180         <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">
9181                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9182                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9183                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9184                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9185                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9186                 </fields>
9187                 <links>
9188                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9189                 </links>
9190         </class>
9191
9192     <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">
9193         <fields>
9194             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9195             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9196             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9197         </fields>
9198                 <links>
9199                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9200                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9201                 </links>
9202     </class>
9203
9204     <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">
9205         <fields>
9206             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9207             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9208         </fields>
9209                 <links>
9210                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9211                 </links>
9212     </class>
9213
9214     <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">
9215         <fields>
9216             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9217             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9218             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9219         </fields>
9220                 <links>
9221                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9222                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9223                 </links>
9224     </class>
9225
9226     <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">
9227         <fields>
9228             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9229             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9230         </fields>
9231                 <links>
9232                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9233                 </links>
9234     </class>
9235
9236     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9237                 <oils_persist:source_definition>
9238
9239             SELECT  DISTINCT l.*
9240               FROM  action.unfulfilled_hold_loops l
9241                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9242               WHERE l.count = m.max
9243
9244                 </oils_persist:source_definition>
9245         <fields>
9246             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9247             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9248             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9249         </fields>
9250                 <links>
9251                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9252                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9253                 </links>
9254     </class>
9255
9256         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9257                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9258                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9259                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9260                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9261                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9262                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9263                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9264                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9265                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9266                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9267                 </fields>
9268                 <links>
9269                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9270                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9271                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9272                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9273                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9274                 </links>
9275         </class>
9276
9277         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9278                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9279                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9280                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9281                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9282                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9283                 </fields>
9284                 <links>
9285                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9286                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9287                 </links>
9288         </class>
9289
9290         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9291                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9292                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9293                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9294                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9295                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9296                 </fields>
9297                 <links>
9298                 </links>
9299         </class>
9300
9301         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9302                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9303                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9304                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9305                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9306                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9307                 </fields>
9308                 <links>
9309                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9310                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9311                 </links>
9312         </class>
9313         
9314         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9315                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9316                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9317                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9318                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9319                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9320                 </fields>
9321                 <links>
9322                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9323                 </links>
9324         </class>
9325         
9326         <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">
9327                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9328                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9329                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9330                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9331                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9332                 </fields>
9333                 <links>
9334                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9335                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9336                 </links>
9337         </class>
9338
9339         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9340                 <fields oils_persist:primary="name">
9341                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9342                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9343                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9344                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9345                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9346                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9347                 </fields>
9348                 <links>
9349                 </links>
9350         </class>
9351
9352         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9353                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9354                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9355                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9356                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9357                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9358                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9359                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9360                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9361                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9362                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9363                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9364                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9365                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9366                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9367                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9368                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9369                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9370                 </fields>
9371                 <links>
9372                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9373                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9374                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9375                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9376                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9377                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9378                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9379                 </links>
9380         </class>
9381
9382         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9383                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9384                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9385                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9386                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9387                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9388                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9389                 </fields>
9390                 <links>
9391                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9392                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9393                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9394                 </links>
9395         </class>
9396
9397         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9398                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9399                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9400                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9401                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9402                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9403                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9404                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9405                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9406                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9407                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9408                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9409                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9410                 </fields>
9411                 <links>
9412                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9413                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9414                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9415                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9416                 </links>
9417         </class>
9418
9419         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9420                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9421                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9422                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9423                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9424                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9425                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9426                 </fields>
9427                 <links>
9428                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9429                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9430                 </links>
9431         </class>
9432
9433         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9434                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9435                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9436                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9437                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9438                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9439                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9440                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9441                 </fields>
9442                 <links>
9443                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9444                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9445                 </links>
9446         </class>
9447
9448         <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">
9449                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9450                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9451                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9452                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9453                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9454                 </fields>
9455                 <links>
9456                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9457                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9458                 </links>
9459         </class>
9460
9461         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9462                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9463                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9464                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9465                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9466                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9467                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9468                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9469                 </fields>
9470                 <links>
9471                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9472                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9473                 </links>
9474         </class>
9475
9476         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9477                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9478                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9479                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9480                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9481                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9482                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9483                 </fields>
9484                 <links>
9485                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9486                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9487                 </links>
9488         </class>
9489
9490         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9491                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9492                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9493                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9494                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9495                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9496                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9497                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9498                 </fields>
9499                 <links>
9500                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9501                 </links>
9502         </class>
9503
9504         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9505                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9506                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9507                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9508                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9509                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9510                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9511                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9512                 </fields>
9513                 <links>
9514                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9515                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9516                 </links>
9517         </class>
9518
9519         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9520                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9521                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9522                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9523                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9524                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9525                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9526                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9527                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9528                 </fields>
9529                 <links>
9530                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9531                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9532                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9533                 </links>
9534         </class>
9535
9536         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9537                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9538                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9539                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9540                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9541                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9542                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9543                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9544                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9545                 </fields>
9546                 <links>
9547                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9548                 </links>
9549         </class>
9550
9551         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9552                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9553                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9554                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9555                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9556                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9557                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9558                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9559                 </fields>
9560                 <links>
9561                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9562                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9563                 </links>
9564         </class>
9565
9566         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9567                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9568                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9569                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9570                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9571                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9572                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9573                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9574                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9575                 </fields>
9576                 <links>
9577                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9578                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9579                 </links>
9580         </class>
9581
9582         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9583                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9584                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9585                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9586                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9587                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9588                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9589                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9590                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9591                 </fields>
9592                 <links>
9593                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9594                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9595                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9596                 </links>
9597         </class>
9598
9599         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9600                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9601                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9602                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9603                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9604                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9605                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9606                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9607                 </fields>
9608                 <links>
9609                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9610                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9611                 </links>
9612         </class>
9613
9614         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9615                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9616                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9617                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9618                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9619                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9620                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9621                 </fields>
9622                 <links>
9623                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9624                 </links>
9625         </class>
9626
9627         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9628                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9629                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9630                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9631                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9632                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9633                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9634                 </fields>
9635                 <links>
9636                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9637                 </links>
9638         </class>
9639
9640         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9641                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9642                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9643                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9644                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9645                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9646                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9647                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9648                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9649                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9650                 </fields>
9651                 <links>
9652                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9653                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9654                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9655                 </links>
9656         </class>
9657
9658         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9659                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9660                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9661                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9662                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9663                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9664                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9665                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9666                 </fields>
9667                 <links>
9668                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9669                 </links>
9670         </class>
9671
9672         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9673                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9674                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9675                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9676                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9677                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9678                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9679                 </fields>
9680                 <links>
9681                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9682                 </links>
9683         </class>
9684
9685         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9686                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9687                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9688                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9689                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9690                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9691                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9692                 </fields>
9693                 <links>
9694                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9695                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9696                 </links>
9697         </class>
9698
9699         <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">
9700                 <fields oils_persist:primary="id">
9701                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9702                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9703                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9704                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9705                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9706                 </fields>
9707                 <links>
9708                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9709                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9710                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9711                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9712                 </links>
9713         </class>
9714
9715         <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">
9716                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9717                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9718                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9719                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9720                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9721                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9722                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9723                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9724                 </fields>
9725                 <links/>
9726                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9727                         <actions>
9728                                 <retrieve/>
9729                         </actions>
9730                 </permacrud>
9731         </class>
9732
9733         <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">
9734                 <fields oils_persist:primary="ptype_key">
9735                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9736                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9737                 </fields>
9738                 <links/>
9739                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9740                         <actions>
9741                                 <retrieve/>
9742                         </actions>
9743                 </permacrud>
9744         </class>
9745
9746         <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">
9747                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9748                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9749                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9750                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9751                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9752                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9753                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9754                 </fields>
9755                 <links>
9756                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9757                 </links>
9758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9759                         <actions>
9760                                 <retrieve/>
9761                         </actions>
9762                 </permacrud>
9763         </class>
9764
9765         <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">
9766                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9767                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9768                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9769                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9770                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9771                 </fields>
9772                 <links>
9773                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9774                 </links>
9775                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9776                         <actions>
9777                                 <retrieve/>
9778                         </actions>
9779                 </permacrud>
9780         </class>
9781
9782     <class
9783         id="uvs"
9784         controller="open-ils.cstore open-ils.pcrud"
9785         oils_obj:fieldmapper="url_verify::session"
9786         oils_persist:tablename="url_verify.session"
9787         reporter:label="URL Verification Session"
9788     >
9789         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9790             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9791             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9792                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9793             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9794             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9795             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9796             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9797             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9798             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9799         </fields>
9800
9801         <links>
9802             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9803             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9804             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
9805             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
9806             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
9807         </links>
9808
9809         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9810             <actions>
9811                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
9812             </actions>
9813         </permacrud>
9814
9815     </class>
9816
9817     <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">
9818         <oils_persist:source_definition>
9819             SELECT
9820                 cbrebi.id AS id,  -- so we can have a pkey in our view
9821                 uvs.id AS session,
9822                 uvs.owning_lib,
9823                 cbrebi.target_biblio_record_entry
9824             FROM url_verify.session uvs
9825             JOIN container.biblio_record_entry_bucket cbreb
9826                 ON (uvs.container = cbreb.id)
9827             JOIN container.biblio_record_entry_bucket_item cbrebi
9828                 ON (cbrebi.bucket = cbreb.id)
9829         </oils_persist:source_definition>
9830         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
9831             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
9832             <field reporter:label="Session" name="session" reporter:datatype="link" />
9833             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9834             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
9835         </fields>
9836         <links>
9837             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
9838             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
9839             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
9840         </links>
9841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9842             <actions>
9843                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
9844             </actions>
9845         </permacrud>
9846     </class>
9847
9848     <class
9849         id="uvus"
9850         controller="open-ils.cstore open-ils.pcrud"
9851         oils_obj:fieldmapper="url_verify::url_selector"
9852         oils_persist:tablename="url_verify.url_selector"
9853         reporter:label="URL Verification URL Selector"
9854     >
9855         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
9856             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
9857             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
9858                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9859             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
9860         </fields>
9861
9862         <links>
9863             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9864             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
9865         </links>
9866
9867         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9868             <actions>
9869                 <create permission="URL_VERIFY">
9870                     <context link="session" field="owning_lib"/>
9871                 </create>
9872                 <retrieve permission="URL_VERIFY">
9873                     <context link="session" field="owning_lib"/>
9874                 </retrieve>
9875                 <update permission="URL_VERIFY">
9876                     <context link="session" field="owning_lib"/>
9877                 </update>
9878                 <delete permission="URL_VERIFY">
9879                     <context link="session" field="owning_lib"/>
9880                 </delete>
9881             </actions>
9882         </permacrud>
9883
9884     </class>
9885
9886     <class
9887         id="uvu"
9888         controller="open-ils.cstore open-ils.pcrud"
9889         oils_obj:fieldmapper="url_verify::url"
9890         oils_persist:tablename="url_verify.url"
9891         reporter:label="URL Verification URL"
9892     >
9893         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
9894             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
9895                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
9896                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
9897                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9898                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
9899             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9900             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9901             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
9902             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
9903             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
9904             <field reporter:label="Host" name="host" reporter:datatype="text"/>
9905             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
9906             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
9907             <field reporter:label="Path" name="path" reporter:datatype="text"/>
9908             <field reporter:label="Page" name="page" reporter:datatype="text"/>
9909             <field reporter:label="Query" name="query" reporter:datatype="text"/>
9910             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
9911             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
9912         </fields>
9913
9914         <links>
9915             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
9916             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
9917             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9918             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
9919             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
9920         </links>
9921
9922         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9923             <actions>
9924                 <create permission="URL_VERIFY">
9925                     <context link="session" field="owning_lib"/>
9926                 </create>
9927                 <retrieve permission="URL_VERIFY">
9928                     <context link="session" field="owning_lib"/>
9929                 </retrieve>
9930                 <update permission="URL_VERIFY">
9931                     <context link="session" field="owning_lib"/>
9932                 </update>
9933                 <delete permission="URL_VERIFY">
9934                     <context link="session" field="owning_lib"/>
9935                 </delete>
9936             </actions>
9937         </permacrud>
9938
9939     </class>
9940
9941     <class
9942         id="uvva"
9943         controller="open-ils.cstore open-ils.pcrud"
9944         oils_obj:fieldmapper="url_verify::verification_attempt"
9945         oils_persist:tablename="url_verify.verification_attempt"
9946         reporter:label="URL Verification Attempt"
9947     >
9948         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
9949             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
9950                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
9951                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
9952             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
9953             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
9954         </fields>
9955
9956         <links>
9957             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9958             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9959         </links>
9960
9961         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9962             <actions>
9963                 <create permission="URL_VERIFY">
9964                     <context link="session" field="owning_lib"/>
9965                 </create>
9966                 <retrieve permission="URL_VERIFY">
9967                     <context link="session" field="owning_lib"/>
9968                 </retrieve>
9969                 <update permission="URL_VERIFY">
9970                     <context link="session" field="owning_lib"/>
9971                 </update>
9972                 <delete permission="URL_VERIFY">
9973                     <context link="session" field="owning_lib"/>
9974                 </delete>
9975             </actions>
9976         </permacrud>
9977
9978     </class>
9979
9980     <class
9981         id="uvuv"
9982         controller="open-ils.cstore open-ils.pcrud"
9983         oils_obj:fieldmapper="url_verify::url_verification"
9984         oils_persist:tablename="url_verify.url_verification"
9985         reporter:label="URL Verification"
9986     >
9987         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
9988             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
9989                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
9990                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
9991             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
9992             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
9993             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
9994             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
9995                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
9996         </fields>
9997
9998         <links>
9999             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10000             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10001             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10002         </links>
10003
10004         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10005             <actions>
10006                 <create permission="URL_VERIFY">
10007                     <context link="attempt" jump="session" field="owning_lib"/>
10008                 </create>
10009                 <retrieve permission="URL_VERIFY">
10010                     <context link="attempt" jump="session" field="owning_lib"/>
10011                 </retrieve>
10012                 <update permission="URL_VERIFY">
10013                     <context link="attempt" jump="session" field="owning_lib"/>
10014                 </update>
10015                 <delete permission="URL_VERIFY">
10016                     <context link="attempt" jump="session" field="owning_lib"/>
10017                 </delete>
10018             </actions>
10019         </permacrud>
10020
10021     </class>
10022
10023         <class
10024                 id="cfdi"
10025                 controller="open-ils.cstore open-ils.pcrud"
10026                 oils_obj:fieldmapper="config::filter_dialog_interface"
10027                 oils_persist:tablename="config.filter_dialog_interface"
10028                 reporter:label="FilterDialog Interface">
10029                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10030                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10031                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10032                 </fields>
10033                 <links>
10034                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10035                 </links>
10036                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10037                         <actions>
10038                                 <retrieve />
10039                         </actions>
10040                 </permacrud>
10041         </class>
10042
10043         <class
10044                 id="cfdfs"
10045                 controller="open-ils.cstore open-ils.pcrud"
10046                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10047                 oils_persist:tablename="config.filter_dialog_filter_set"
10048                 reporter:label="FilterDialog Filter Set">
10049                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10050                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10051                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10052                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10053                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10054                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10055                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10056                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10057                 </fields>
10058                 <links>
10059                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10060                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10061                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10062                 </links>
10063                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10064                         <actions>
10065                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10066                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10067                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10068                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10069                         </actions>
10070                 </permacrud>
10071
10072         </class>
10073
10074         <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">
10075                 <fields oils_persist:primary="code">
10076                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10077                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10078                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10079                 </fields>
10080                 <links/>
10081                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10082                         <actions>
10083                                 <retrieve/>
10084                         </actions>
10085                 </permacrud>
10086         </class>
10087
10088         <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">
10089                 <oils_persist:source_definition>
10090
10091             SELECT  b.id,
10092                     MAX(dcp.edit_date) AS last_delete_date
10093              FROM   biblio.record_entry b
10094                     JOIN asset.call_number cn ON (cn.record = b.id)
10095                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10096              WHERE  NOT b.deleted
10097              GROUP BY b.id
10098              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10099
10100                 </oils_persist:source_definition>
10101                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10102                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10103                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10104                 </fields>
10105                 <links>
10106                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10107                 </links>
10108                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10109                         <actions>
10110                                 <retrieve/>
10111                         </actions>
10112                 </permacrud>
10113         </class>
10114
10115         <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">
10116                 <oils_persist:source_definition>
10117
10118             -- -- 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.
10119             -- -- 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
10120             -- -- may not.
10121             -- SELECT
10122             --     bre.id AS "bib_id",
10123             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
10124             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
10125             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
10126             -- FROM (
10127                 SELECT
10128                     y.bre AS "id",
10129                     COALESCE( x.copy_count, 0 ) AS "copy_count",
10130                     y.hold_count AS "hold_count",
10131                     (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"
10132                 FROM (
10133                         SELECT
10134                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
10135                             COUNT(*) AS "hold_count"
10136                         FROM action.hold_request h
10137                         WHERE
10138                             cancel_time IS NULL
10139                             AND fulfillment_time IS NULL
10140                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10141                         GROUP BY 1
10142                     )y LEFT JOIN (
10143                         SELECT 
10144                             (SELECT id
10145                                 FROM biblio.record_entry 
10146                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
10147                             ) AS "bre", 
10148                             COUNT(*) AS "copy_count"
10149                         FROM asset.copy
10150                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10151                         WHERE copy.holdable 
10152                             AND NOT copy.deleted 
10153                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10154                         GROUP BY 1
10155                     )x ON x.bre = y.bre
10156                 -- )z RIGHT JOIN (
10157                 --     SELECT id
10158                 --     FROM biblio.record_entry
10159                 --     WHERE NOT deleted
10160                 -- )bre ON (z.bib_id = bre.id)
10161                 
10162
10163                 </oils_persist:source_definition>
10164                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10165                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10166                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10167                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10168                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10169                 </fields>
10170                 <links>
10171                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10172                 </links>
10173                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10174                         <actions>
10175                                 <retrieve/>
10176                         </actions>
10177                 </permacrud>
10178         </class>
10179
10180         <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">
10181                 <oils_persist:source_definition>
10182             SELECT *,
10183                 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,
10184                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10185             FROM
10186                 (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
10187                     FROM
10188                         action.hold_request ahr
10189                         JOIN reporter.hold_request_record rhrr USING (id)
10190                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10191                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10192                     WHERE
10193                         ahr.cancel_time IS NULL
10194                         AND ahr.fulfillment_time IS NULL
10195                     GROUP BY bib_record, pickup_lib
10196                 )x
10197                 JOIN
10198                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10199                     FROM
10200                         action.hold_request ahr
10201                         JOIN reporter.hold_request_record rhrr USING (id)
10202                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10203                     WHERE
10204                         ahr.cancel_time IS NULL
10205                         AND ahr.fulfillment_time IS NULL
10206                     GROUP BY bib_record
10207                 )y
10208                 USING (id)
10209                 </oils_persist:source_definition>
10210                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10211                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10212                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10213                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10214                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10215                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10216                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10217                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10218                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10219                 </fields>
10220                 <links>
10221                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10222                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10223                 </links>
10224                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10225                         <actions>
10226                                 <retrieve/>
10227                         </actions>
10228                 </permacrud>
10229         </class>
10230
10231         <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">
10232                 <oils_persist:source_definition>
10233             SELECT
10234                 ac.id,
10235                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10236                 MAX(actac.xact_start) AS last_circ
10237             FROM asset.copy ac
10238                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10239             GROUP BY ac.id
10240
10241             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10242             --SELECT
10243             --    ac.id,
10244             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10245             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10246             --FROM asset.copy ac
10247             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10248             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10249             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10250                 </oils_persist:source_definition>
10251                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10252                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10253                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10254                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10255                 </fields>
10256                 <links>
10257                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10258                 </links>
10259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10260                         <actions>
10261                                 <retrieve/>
10262                         </actions>
10263                 </permacrud>
10264         </class>
10265
10266         <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">
10267                 <fields oils_persist:primary="id">
10268                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10269                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10270                 </fields>
10271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10272                         <actions>
10273                                 <retrieve/>
10274                         </actions>
10275                 </permacrud>
10276         </class>
10277
10278         <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">
10279                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10280                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10281                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10282                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10283                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10284                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10285                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10286                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10287                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10288                 </fields>
10289                 <links>
10290                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10291                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10292                 </links>
10293                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10294                         <actions>
10295                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10296                                 <retrieve/>
10297                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10298                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10299                         </actions>
10300                 </permacrud>
10301         </class>
10302
10303         <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">
10304                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10305                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10306                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10307                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10308                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10309                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10310                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10311                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10312                 </fields>
10313                 <links>
10314                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10315                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10316                 </links>
10317                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10318                         <actions>
10319                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10320                                 <retrieve/>
10321                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10322                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10323                         </actions>
10324                 </permacrud>
10325         </class>
10326
10327
10328         <!-- ********************************************************************************************************************* -->
10329         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10330         <!-- ********************************************************************************************************************* -->
10331         <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">
10332                 <fields oils_persist:primary="id">
10333                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10334                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10335                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10336                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10337                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10338                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10339                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10340                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10341                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10342                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10343                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10344                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10345                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10346                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10347                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10348                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10349                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10350                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10351                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10352                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10353                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10354                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10355                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10356                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10357                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10358                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10359                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10360                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10361                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10362                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10363                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10364                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10365                 </fields>
10366                 <links>
10367                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10368                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10369                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10370                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10371                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10372                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10373                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10374                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10375                 </links>
10376         </class>
10377
10378         <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">
10379                 <fields oils_persist:primary="id">
10380                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10381                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10382                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10383                 </fields>
10384                 <links>
10385                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10386                 </links>
10387         </class>
10388
10389         <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">
10390                 <fields oils_persist:primary="id">
10391                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10392                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10393                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10394                 </fields>
10395                 <links>
10396                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10397                 </links>
10398         </class>
10399
10400         <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">
10401                 <fields oils_persist:primary="id">
10402                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10403
10404                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10405                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10406                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10407
10408                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10409                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10410                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10411
10412                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10413                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10414
10415                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10416                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10417                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10418
10419                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10420                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10421
10422                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10423                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10424                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10425
10426                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10427                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10428                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10429
10430                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10431                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10432                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10433                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10434
10435                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10436                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10437
10438                 </fields>
10439                 <links>
10440                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10441                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10442                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10443                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10444                 </links>
10445         </class>
10446
10447         <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">
10448                 <oils_persist:source_definition>
10449
10450             SELECT
10451                 po.ordering_agency AS ordering_agency,
10452                 po.id AS purchase_order,
10453                 li.id AS lineitem,
10454                 lid.id AS lineitem_detail,
10455                 cpa.id AS claim_policy_action
10456             FROM
10457                 acq.lineitem_detail lid
10458                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10459                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10460                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10461                 JOIN acq.claim_policy_action cpa ON (
10462                     cpa.claim_policy = cp.id
10463
10464                     -- we only care about claim policy actions whose claim
10465                     -- interval we'd reached or exceeded
10466                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10467
10468                     -- filter out all claim policy actions where claim events
10469                     -- have occurred on or after the action's action_interval
10470                     AND NOT EXISTS (
10471                         SELECT 1
10472                         FROM
10473                             acq.claim_event evt
10474                             JOIN acq.claim claim ON (
10475                                 claim.id = evt.claim
10476                                 AND claim.lineitem_detail = lid.id
10477                             )
10478                         WHERE
10479                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10480                     )
10481                 )
10482             WHERE
10483                 lid.cancel_reason IS NULL
10484                 AND li.cancel_reason IS NULL -- belt/suspenders
10485                 AND po.cancel_reason IS NULL -- belt/suspenders
10486                 AND lid.recv_time IS NULL
10487                 AND po.state = 'on-order'
10488             ORDER BY 1, 2, 3, 4, 5
10489
10490                 </oils_persist:source_definition>
10491                 <fields>
10492                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10493                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10494                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10495                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10496                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10497                 </fields>
10498                 <links>
10499                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10500                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10501                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10502                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10503                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10504                 </links>
10505         </class>
10506         <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">
10507                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10508                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10509                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10510                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10511                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10512                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10513                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10514                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10515                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10516                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10517                 </fields>
10518                 <links>
10519                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10520                 </links>
10521     </class>
10522         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10523                 <oils_persist:source_definition>
10524             SELECT * FROM acq.lineitem_summary 
10525                                 WHERE item_count > (invoice_count + cancel_count)
10526         </oils_persist:source_definition>
10527                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10528                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10529                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10530                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10531                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10532                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10533                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10534                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10535                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10536                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10537                 </fields>
10538                 <links>
10539                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10540                 </links>
10541     </class>
10542         <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">
10543                 <oils_persist:source_definition>
10544
10545                         SELECT  t.*
10546                           FROM  action.transit_copy t
10547                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10548                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10549                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10550
10551                 </oils_persist:source_definition>
10552                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10553                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10554                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10555                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10556                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10557                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10558                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10559                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10560                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10561                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10562                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10563                 </fields>
10564                 <links>
10565                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10566                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10567                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10568                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10569                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10570                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10571                 </links>
10572         </class>
10573
10574     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10575                 <oils_persist:source_definition>
10576
10577         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10578                 SELECT
10579                         cp.id as copy,
10580                         COUNT(circ.id),
10581                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10582                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10583                 FROM
10584                         asset.copy cp
10585                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10586                 GROUP BY 1, 3, 4
10587                 UNION ALL
10588                 SELECT
10589                         cp.id as copy,
10590                         COUNT(circ.id),
10591                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10592                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10593                 FROM
10594                         asset.copy cp
10595                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10596                 GROUP BY 1, 3, 4
10597                 UNION ALL
10598                 SELECT
10599                         id as copy,
10600                         circ_count,
10601                         -1 AS year,
10602                         false as is_renewal
10603                 FROM
10604                         extend_reporter.legacy_circ_count
10605         )x GROUP BY 1, 3, 4
10606
10607                 </oils_persist:source_definition>
10608         <fields>
10609             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10610             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10611             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10612             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10613         </fields>
10614                 <links>
10615                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10616                 </links>
10617                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10618                         <actions>
10619                                 <retrieve/>
10620                         </actions>
10621                 </permacrud>
10622     </class>
10623
10624         <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">
10625                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10626                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10627                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10628                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10629                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10630                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10631                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10632                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10633                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10634                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10635                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10636                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10637                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10638                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10639                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10640                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10641                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10642                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10643                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10644                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10645                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10646                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10647                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10648                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10649                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
10650                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10651                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10652                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10653                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10654                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10655                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10656                 </fields>
10657                 <links>
10658                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10659                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10660                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10661                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10662                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10663                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10664                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10665                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10666                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10667                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10668                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10669                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10670                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10671                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10672                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10673                 </links>
10674         </class>
10675
10676     <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">
10677         <fields oils_persist:primary="id">
10678             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10679             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10680             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
10681             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10682             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10683             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10684             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10685             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10686             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10687             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10688             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10689             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10690             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
10691             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
10692             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10693             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10694             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10695             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10696             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10697             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10698             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10699             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10700             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10701             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10702             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10703             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10704             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10705             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10706             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10707             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10708             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10709             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10710             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10711             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10712         </fields>
10713         <links>
10714             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10715             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10716             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10717             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10718             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10719         </links>
10720     </class>
10721
10722     <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">
10723         <fields oils_persist:primary="id">
10724             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10725             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10726             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10727             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10728         </fields>
10729         <links>
10730             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10731             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10732         </links>
10733     </class>
10734
10735     <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">
10736         <fields oils_persist:primary="owning_lib">
10737             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10738             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10739             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10740         </fields>
10741         <links>
10742             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10743         </links>
10744     </class>
10745
10746     <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">
10747         <fields oils_persist:primary="id">
10748             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10749             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10750             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10751             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10752             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10753         </fields>
10754         <links>
10755             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10756             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10757             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10758         </links>
10759     </class>
10760
10761     <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">
10762         <fields oils_persist:primary="circ_lib">
10763             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10764             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10765             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10766             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10767         </fields>
10768         <links>
10769             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10770             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10771         </links>
10772     </class>
10773
10774     <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">
10775         <fields oils_persist:primary="id">
10776             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10777             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10778             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10779             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10780             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10781         </fields>
10782         <links>
10783             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10784             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10785             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10786         </links>
10787     </class>
10788
10789     <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">
10790         <fields oils_persist:primary="home_ou">
10791             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10792             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10793             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10794             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10795         </fields>
10796         <links>
10797             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10798             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10799         </links>
10800     </class>
10801         <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">
10802                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
10803                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
10804                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
10805                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
10806                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
10807                 </fields>
10808                 <links>
10809                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10810                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
10811                 </links>
10812                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10813                         <actions>
10814                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10815                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
10816                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10817                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10818                         </actions>
10819                 </permacrud>
10820         </class>
10821         <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">
10822                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10823                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10824                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10825                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10826                 </fields>
10827                 <links>
10828                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10829                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10830                         </links>
10831                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10832                 <actions>
10833                                 <create permission="ADMIN_ACQ_FUND_TAG">
10834                                         <context link="tag" field="owner"/>
10835                                 </create>
10836                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10837                                         <context link="tag" field="owner"/>
10838                                 </retrieve>
10839                                 <update permission="ADMIN_ACQ_FUND_TAG">
10840                                         <context link="tag" field="owner"/>
10841                                 </update>
10842                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10843                                         <context link="tag" field="owner"/>
10844                                 </delete>
10845                         </actions>
10846                 </permacrud>
10847         </class>
10848         <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">
10849                 <oils_persist:source_definition><![CDATA[
10850                 SELECT
10851                         poi.purchase_order AS purchase_order,
10852                         ii.invoice AS invoice,
10853                         NULL AS lineitem,
10854                         poi.id AS po_item,
10855                         NULL AS picklist
10856                 FROM
10857                         acq.po_item poi
10858                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10859                 UNION SELECT
10860                         jub.purchase_order AS purchase_order,
10861                         ie.invoice AS invoice,
10862                         jub.id AS lineitem,
10863                         NULL AS po_item,
10864                         jub.picklist AS picklist
10865                 FROM
10866                         acq.lineitem jub
10867                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10868                 UNION SELECT
10869                         ii.purchase_order AS purchase_order,
10870                         ii.invoice AS invoice,
10871                         NULL AS lineitem,
10872                         NULL AS po_item,
10873                         NULL AS picklist
10874                 FROM
10875                         acq.invoice_item ii
10876                 WHERE ii.po_item IS NULL
10877                 UNION SELECT
10878                         ie.purchase_order AS purchase_order,
10879                         ie.invoice AS invoice,
10880                         NULL AS lineitem,
10881                         NULL AS po_item,
10882                         NULL AS picklist
10883                 FROM
10884                         acq.invoice_entry ie
10885                 WHERE ie.lineitem IS NULL
10886                 UNION SELECT
10887                         NULL AS purchase_order,
10888                         NULL AS invoice,
10889                         jub.id AS lineitem,
10890                         NULL AS po_item,
10891                         jub.picklist AS picklist
10892                 FROM
10893                         acq.lineitem jub
10894                 WHERE jub.purchase_order IS NULL
10895                 ]]></oils_persist:source_definition>
10896                 <fields>
10897                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10898                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10899                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10900                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10901                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10902                 </fields>
10903                 <links>
10904                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10905                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10906                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10907                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10908                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10909                 </links>
10910         </class>
10911         <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">
10912                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10913                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10914                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10915                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10916                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10917                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10918                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10919                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10920                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10921                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10922                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10923                 </fields>
10924                 <links>
10925                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10926                 </links>
10927                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10928                         <actions>
10929                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10930                                 <retrieve/>
10931                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10932                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10933                         </actions>
10934                 </permacrud>
10935         </class>
10936
10937         <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">
10938                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10939                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10940                         <field name="date_applied" reporter:datatype="timestamp"/>
10941                         <field name="org" reporter:datatype="org_unit"/>
10942                         <field name="original_value" reporter:datatype="text"/>
10943                         <field name="new_value" reporter:datatype="text"/>
10944                         <field name="field_name" reporter:datatype="link"/>
10945                 </fields>
10946                 <links>
10947                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10948                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10949                 </links>
10950                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10951                         <actions>
10952                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10953                                 <retrieve/>
10954                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10955                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10956                         </actions>
10957                 </permacrud>
10958         </class>
10959         <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">
10960                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10961                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10962                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10963                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10964                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10965                 </fields>
10966                 <links>
10967                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10968                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10969                 </links>
10970         </class>
10971         <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">
10972                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10973                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10974                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10975                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10976                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10977                 </fields>
10978                 <links>
10979                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10980                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10981                 </links>
10982         </class>
10983         <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">
10984                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
10985                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10986                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10987                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
10988                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
10989                 </fields>
10990                 <links>
10991                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
10992                 </links>
10993                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10994                         <actions>
10995                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
10996                                 <retrieve/>
10997                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
10998                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
10999                         </actions>
11000                 </permacrud>
11001         </class>
11002         <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">
11003                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11004                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11005                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11006                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11007                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11008                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11009                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11010                 </fields>
11011                 <links>
11012                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11013                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11014                 </links>
11015                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11016                         <actions>
11017                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11018                                 <retrieve/>
11019                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11020                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11021                         </actions>
11022                 </permacrud>
11023         </class>
11024
11025         <!-- ********************************************************************************************************************* -->
11026
11027 </IDL>
11028
11029 <!--
11030     vim:noet:ts=4:sw=4:
11031 -->