]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
9225c86a8b112f1a1edd729f8df9d1780718ac7b
[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                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                         <field name="debit_card_payment" oils_persist:virtual="true" />
98                 </fields>
99                 <links>
100                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
101                 </links>
102         </class>
103
104         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
105                 <fields>
106                         <field name="id" oils_persist:virtual="true" />
107                         <field name="children" oils_persist:virtual="true" />
108                         <field name="owner_doc" oils_persist:virtual="true" />
109                         <field name="intra_doc_id" oils_persist:virtual="true" />
110                         <field name="parent_node" oils_persist:virtual="true" />
111                         <field name="node_type" oils_persist:virtual="true" />
112                         <field name="namespace_uri" oils_persist:virtual="true" />
113                         <field name="name" oils_persist:virtual="true" />
114                         <field name="value" oils_persist:virtual="true" />
115                 </fields>
116         </class>
117
118         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
119                 <fields>
120                         <field name="title" oils_persist:virtual="true" />
121                         <field name="author" oils_persist:virtual="true" />
122                         <field name="doc_id" oils_persist:virtual="true" />
123                         <field name="doc_type" oils_persist:virtual="true" />
124                         <field name="pubdate" oils_persist:virtual="true" />
125                         <field name="isbn" oils_persist:virtual="true" />
126                         <field name="publisher" oils_persist:virtual="true" />
127                         <field name="tcn" oils_persist:virtual="true" />
128                         <field name="subject" oils_persist:virtual="true" />
129                         <field name="types_of_resource" oils_persist:virtual="true" />
130                         <field name="call_numbers" oils_persist:virtual="true" />
131                         <field name="edition" oils_persist:virtual="true" />
132                         <field name="online_loc" oils_persist:virtual="true" />
133                         <field name="synopsis" oils_persist:virtual="true" />
134                         <field name="physical_description" oils_persist:virtual="true" />
135                         <field name="toc" oils_persist:virtual="true" />
136                         <field name="copy_count" oils_persist:virtual="true" />
137                         <field name="series" oils_persist:virtual="true" />
138                         <field name="serials" oils_persist:virtual="true" />
139                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
140                 </fields>
141         </class>
142
143         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
144                 <fields>
145                         <field name="err_msg" oils_persist:virtual="true" />
146                         <field name="type" oils_persist:virtual="true" />
147                 </fields>
148         </class>
149
150         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
151                 <fields>
152                         <field name="err_msg" oils_persist:virtual="true" />
153                         <field name="type" oils_persist:virtual="true" />
154                 </fields>
155         </class>
156
157         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
158                 <fields oils_persist:primary="matchpoint">
159                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
160                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
161                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
162                 </fields>
163                 <links>
164                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
165                 </links>
166         </class>
167
168         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
169         <!-- when the time is right, turn me into a view.  -->
170                 <fields>
171             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
172             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
173             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
174             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
175             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
176             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
177             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
179             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
180             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
181                 </fields>
182         </class>
183
184         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
185                 <fields>
186                         <field name="public_name" oils_persist:virtual="true" />
187                         <field name="target_url" oils_persist:virtual="true" />
188                         <field name="target_coverage" oils_persist:virtual="true" />
189                         <field name="target_embargo" oils_persist:virtual="true" />
190                 </fields>
191         </class>
192
193         <!-- Actually in the DB -->
194         <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">
195                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
196                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
197                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
198                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
199                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
200                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
201                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
202                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
203                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
204                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
205                 </fields>
206                 <links>
207                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
208                 </links>
209                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
210                         <actions>
211                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
212                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
213                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
214                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
215                         </actions>
216                 </permacrud>
217         </class>
218
219         <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">
220                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
221                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
222                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
223                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
224                 </fields>
225                 <links>
226                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
227                 </links>
228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
229                         <actions>
230                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
231                     <context link="grp" field="owner"/>
232                 </create>
233                                 <retrieve/>
234                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
235                     <context link="grp" field="owner"/>
236                 </update>
237                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
238                     <context link="grp" field="owner"/>
239                 </delete>
240                         </actions>
241                 </permacrud>
242         </class>
243
244         <class  id="rrbs" 
245             controller="open-ils.cstore open-ils.pcrud" 
246             oils_obj:fieldmapper="rating::record_badge_score" 
247             oils_persist:tablename="rating.record_badge_score" 
248             reporter:label="Statistical Popularity Badge">
249                 <fields oils_persist:primary="id" 
250                 oils_persist:sequence="rating.record_badge_score_id_seq">
251                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
252                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
253                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
254                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
255                 </fields>
256         <links>
257             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
258             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
259         </links>
260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
261                         <actions>
262                                 <retrieve/>
263                         </actions>
264                 </permacrud>
265         </class>
266
267         <class  id="rp" 
268             controller="open-ils.cstore open-ils.pcrud" 
269             oils_obj:fieldmapper="rating::popularity_parameter" 
270             oils_persist:tablename="rating.popularity_parameter" 
271             reporter:label="Statistical Popularity Parameter">
272                 <fields oils_persist:primary="id" 
273                 oils_persist:sequence="rating.popularity_parameter_id_seq">
274                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
275                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
276                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
277                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
278                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
279                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
280                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
281                 </fields>
282                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
283                         <actions>
284                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
285                                 <retrieve/>
286                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
287                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
288                         </actions>
289                 </permacrud>
290         </class>
291
292         <class  id="rb" 
293             controller="open-ils.cstore open-ils.pcrud" 
294             oils_obj:fieldmapper="rating::badge" 
295             oils_persist:tablename="rating.badge" 
296             reporter:label="Statistical Popularity Badge">
297                 <fields oils_persist:primary="id" 
298                 oils_persist:sequence="rating.badge_id_seq">
299                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
300                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
302                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
303                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
304                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
306                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
307                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
308                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
309                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
310                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
311                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
312                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
313                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
314                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
315                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
316                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
317                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
318                 </fields>
319                 <links>
320                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
321                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
322                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
323                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
324                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
325                 </links>
326                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
327                         <actions>
328                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
329                                 <retrieve/>
330                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
331                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
332                         </actions>
333                 </permacrud>
334         </class>
335
336         <class  id="vibtg" 
337             controller="open-ils.cstore open-ils.pcrud" 
338             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
339             oils_persist:tablename="vandelay.import_bib_trash_group" 
340             reporter:label="Import/Overlay Field Groups for Removal">
341                 <fields oils_persist:primary="id" 
342                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
343                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
344                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
345                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
346                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
347                 </fields>
348                 <links>
349                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
350                 </links>
351                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
352                         <actions>
353                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
354                                 <retrieve/>
355                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
357                         </actions>
358                 </permacrud>
359         </class>
360
361
362         <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">
363                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
364                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
365                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
366                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
367                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
368                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
369                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
370                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
371                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
372                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
373                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
374                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
375                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
376                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
377                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
378                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
379                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
380                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
381                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
382                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
383                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
384                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
385                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
386                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
387                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
388                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
389                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
390                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
391                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
392                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
393                 </fields>
394                 <links>
395                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
396                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
397                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
398                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
399                 </links>
400                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
401                         <actions>
402                                 <create permission="CREATE_IMPORT_ITEM">
403                     <context link="definition" field="owner"/>
404                                 </create>
405                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
406                     <context link="definition" field="owner"/>
407                                 </retrieve>
408                                 <update permission="UPDATE_IMPORT_ITEM">
409                     <context link="definition" field="owner"/>
410                                 </update>
411                                 <delete permission="DELETE_IMPORT_ITEM">
412                     <context link="definition" field="owner"/>
413                                 </delete>
414                         </actions>
415                 </permacrud>
416         </class>
417
418         <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">
419                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
420                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
421                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
422                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
423                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
424                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
425                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
426                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
427                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
428                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
429                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
430                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
431                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
432                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
433                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
434                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
435                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
436                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
437                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
438                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
439                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
440                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
441                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
442                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
443                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
444                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
445                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
446                 </fields>
447                 <links>
448                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
449                 </links>
450                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
451                         <actions>
452                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
453                                 <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"/>
454                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
456                         </actions>
457                 </permacrud>
458         </class>
459
460         <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">
461                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
462                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
463                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
464                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
465                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
466                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
467                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
468                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
469                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
470                 </fields>
471                 <links>
472                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
473                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
474                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
475                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
476                 </links>
477                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
478                         <actions>
479                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
482                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
483                         </actions>
484                 </permacrud>
485         </class>
486
487         <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">
488                 <fields oils_persist:primary="code">
489                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
490                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
491                 </fields>
492                 <links>
493                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
494                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
495                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
496                 </links>
497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
498                         <actions>
499                                 <retrieve/>
500                         </actions>
501                 </permacrud>
502         </class>
503
504         <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">
505                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
506                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
507                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
508                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
509                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
510                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
511                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
512                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
513                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
514                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
515                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
516                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
517                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
518                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
519                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
520                 </fields>
521                 <links>
522                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
523                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
524                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
525                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
526             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
527             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
528             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
529                 </links>
530                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
531                         <actions>
532                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
533                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
534                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
535                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
536                         </actions>
537                 </permacrud>
538         </class>
539
540         <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">
541                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
542                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
543                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
544                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
545                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
546                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
547                 </fields>
548                 <links/>
549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
550                         <actions>
551                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
552                 <retrieve/>
553                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
554                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
555                         </actions>
556                 </permacrud>
557         </class>
558
559         <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">
560                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
561                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
562                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
563                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
564                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
565                 </fields>
566                 <links>
567                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
568                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
569                 </links>
570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
571                         <actions>
572                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
573                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
574                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
575                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
576                         </actions>
577                 </permacrud>
578         </class>
579
580         <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">
581                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
582                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
583                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
584                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
585                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
586                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
587                 </fields>
588                 <links>
589                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
590                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
591                 </links>
592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
593                         <actions>
594                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
595                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
596                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
597                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
598                         </actions>
599                 </permacrud>
600         </class>
601
602         <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">
603                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
604                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
605                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
606                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
607                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
608                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
609                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
610                 </fields>
611                 <links>
612                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
613                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
614                 </links>
615                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
616                         <actions>
617                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
621                         </actions>
622                 </permacrud>
623         </class>
624
625         <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">
626                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
627                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
628                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
629                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
630                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
631                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
632                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
633                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
634                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
635                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
636                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
637                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
638                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
639                 </fields>
640                 <links>
641                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
642                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
643                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
644             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
645             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
646                 </links>
647                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
648                         <actions>
649                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
650                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
651                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
653                         </actions>
654                 </permacrud>
655         </class>
656
657         <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">
658                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
659                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
660                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
661                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
662                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
663                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
664                 </fields>
665                 <links/>
666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
667                         <actions>
668                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
669                 <retrieve/>
670                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
672                         </actions>
673                 </permacrud>
674         </class>
675
676         <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">
677                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
678                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
679                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
680                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
681                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
682                 </fields>
683                 <links>
684                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
685                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
686                 </links>
687                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
688                         <actions>
689                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
690                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
691                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
693                         </actions>
694                 </permacrud>
695         </class>
696
697         <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">
698                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
699                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
700                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
701                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
702                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
703                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
704                 </fields>
705                 <links>
706                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
707                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
708                 </links>
709                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
710                         <actions>
711                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
712                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
713                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
715                         </actions>
716                 </permacrud>
717         </class>
718
719         <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">
720                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
721                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
722                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
723                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
724                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
725                 </fields>
726                 <links>
727                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
728                 </links>
729                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
730                         <actions>
731                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
732                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
733                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
735                         </actions>
736                 </permacrud>
737         </class>
738
739         <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">
740                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
741                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
742                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
743                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
744                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
745                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
746                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
747                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
748             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
749                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
750                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
751                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
752                 </fields>
753                 <links>
754                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
755                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
756                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
757                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
758                 </links>
759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
760                         <actions>
761                                 <create permission="ADMIN_IMPORT_MATCH_SET">
762                     <context link="match_set" field="owner"/>
763                                 </create>
764                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
765                     <context link="match_set" field="owner"/>
766                                 </retrieve>
767                                 <update permission="ADMIN_IMPORT_MATCH_SET">
768                     <context link="match_set" field="owner"/>
769                                 </update>
770                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
771                     <context link="match_set" field="owner"/>
772                                 </delete>
773                         </actions>
774                 </permacrud>
775         </class>
776
777         <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">
778                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
779                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
780                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
781                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
782                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
783                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
784                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
785                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
786                 </fields>
787                 <links>
788                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
789                 </links>
790                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
791                         <actions>
792                                 <create permission="ADMIN_IMPORT_MATCH_SET">
793                     <context link="match_set" field="owner"/>
794                                 </create>
795                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
796                     <context link="match_set" field="owner"/>
797                                 </retrieve>
798                                 <update permission="ADMIN_IMPORT_MATCH_SET">
799                     <context link="match_set" field="owner"/>
800                                 </update>
801                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
802                     <context link="match_set" field="owner"/>
803                                 </delete>
804                         </actions>
805                 </permacrud>
806         </class>
807
808         <class id="vst" controller="open-ils.cstore open-ils.pcrud" 
809                 oils_obj:fieldmapper="vandelay::session_tracker" 
810                 oils_persist:tablename="vandelay.session_tracker" 
811                 reporter:label="Vandelay Session Tracker">
812                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.session_tracker_id_seq">
813                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
814                         <field reporter:label="Session Key" name="session_key" reporter:datatype="text"/>
815                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
816                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
817                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
818                         <field reporter:label="Record Type" name="record_type" reporter:datatype="text"/>
819                         <!-- queue doesn't use datatype 'link' because it may refer to a bib
820                                          queue or an auth queue and there's no IDL class for vandelay.queue .
821                                          parent table.
822                         -->
823                         <field reporter:label="Source Queue" name="queue" reporter:datatype="int"/>
824                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestsamp"/>
825                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestsamp"/>
826                         <field reporter:label="State" name="state" reporter:datatype="text"/>
827                         <field reporter:label="Action Type" name="action_type" reporter:datatype="text"/>
828                         <field reporter:label="Total Actions" name="total_actions" reporter:datatype="int"/>
829                         <field reporter:label="Actions Performed" name="actions_performed" reporter:datatype="int"/>
830                 </fields>
831                 <links>
832                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
833                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
834                 </links>
835                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
836                         <actions>
837                                 <!-- created by the API -->
838                                 <retrieve global_required="true"
839                                         permission="CREATE_BIB_IMPORT_QUEUE CREATE_AUTHORITY_IMPORT_QUEUE"/>
840                                 <update global_required="true"
841                                         permission="UPDATE_BIB_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE">
842                                         <context link="workstation" field="owning_lib"/>
843                                 </update>
844                                 <delete 
845                                         permission="DELETE_BIB_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE">
846                                         <context link="workstation" field="owning_lib"/>
847                                 </delete>
848                         </actions>
849                 </permacrud>
850         </class>
851
852         <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">
853                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
854                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
855                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
856                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
857                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
858                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
859                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
860                 </fields>
861                 <links>
862                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
863                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
864                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
865                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
866                 </links>
867         </class>
868
869     <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">
870         <fields oils_persist:primary="name">
871             <field reporter:label="Name" name="name" reporter:datatype="text"/>
872             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
873             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
874             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
875         </fields>
876         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
877             <actions>
878                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
879                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
880                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
881                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
882             </actions>
883         </permacrud>
884     </class>
885
886     <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">
887         <fields oils_persist:primary="id">
888             <field reporter:label="ID" name="id" reporter:datatype="id"/>
889             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
890             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
891             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
892             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
893         </fields>
894         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
895             <actions>
896                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
897                 <retrieve/>
898                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
899                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
900             </actions>
901         </permacrud>
902     </class>
903
904         <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">
905                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
906                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
907                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
908                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
909                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
910                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
911                 </fields>
912                 <links>
913                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
914                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
915                 </links>
916         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
917             <actions>
918                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
919                 <retrieve/>
920                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
921                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
922             </actions>
923         </permacrud>
924         </class>
925
926         <class id="cmrcfmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_format" oils_persist:tablename="config.marc_format" reporter:label="MARC Formats" oils_persist:field_safe="true">
927                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
928                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
929                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
930                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
931         </fields>
932         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
933             <actions>
934                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
935                 <retrieve/>
936                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
937                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
938             </actions>
939         </permacrud>
940         </class>
941
942         <class id="cmrcfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_field" oils_persist:tablename="config.marc_field" reporter:label="MARC Fields" oils_persist:field_safe="true">
943                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
944                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
945                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
946                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
947                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
948                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
949                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
950                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
951                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
952                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
953                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
954                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
955         </fields>
956                 <links>
957                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
958                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
959         </links>
960         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
961             <actions>
962                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
963                 <retrieve/>
964                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
965                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
966             </actions>
967         </permacrud>
968         </class>
969
970         <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:subfield_safe="true">
971                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
972                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
973                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
974                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
975                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
976                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
977                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
978                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
979                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
980                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
981                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
982         </fields>
983                 <links>
984                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
985                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
986         </links>
987         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
988             <actions>
989                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
990                 <retrieve/>
991                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
992                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
993             </actions>
994         </permacrud>
995         </class>
996
997         <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">
998                 <fields oils_persist:primary="name">
999                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
1000                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1001                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1002                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
1003                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
1004                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
1005                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
1006                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
1007                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
1008                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
1009                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1010                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1011                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
1012                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
1013                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
1014                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
1015                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
1016                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
1017                 </fields>
1018                 <links>
1019                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
1020                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
1021                 </links>
1022         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1023             <actions>
1024                 <create permission="ADMIN_SVF" global_required="true"/>
1025                 <retrieve/>
1026                 <update permission="ADMIN_SVF" global_required="true"/>
1027                 <delete permission="ADMIN_SVF" global_required="true"/>
1028             </actions>
1029         </permacrud>
1030         </class>
1031
1032         <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">
1033                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
1034                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1035                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
1036                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1037             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
1038                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
1039                 </fields>
1040                 <links/>
1041         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1042             <actions>
1043                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
1044                 <retrieve/>
1045                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1046                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1047             </actions>
1048         </permacrud>
1049         </class>
1050
1051         <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">
1052                 <fields oils_persist:primary="coded_value">
1053                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1054                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1055                 </fields>
1056                 <links>
1057                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1058                 </links>
1059         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1060             <actions>
1061                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1062                 <retrieve/>
1063                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1064                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1065             </actions>
1066         </permacrud>
1067         </class>
1068
1069         <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">
1070                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1071                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1072                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1073                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1074                 </fields>
1075                 <links>
1076                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1077                 </links>
1078         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1079             <actions>
1080                 <retrieve/>
1081             </actions>
1082         </permacrud>
1083         </class>
1084
1085
1086         <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">
1087                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1088                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1089                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1090                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1091                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1092                 </fields>
1093                 <links>
1094                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1095                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1096                 </links>
1097         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1098             <actions>
1099                 <retrieve/>
1100             </actions>
1101         </permacrud>
1102         </class>
1103
1104
1105         <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">
1106                 <fields oils_persist:primary="source">
1107                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1108                         <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 -->
1109                 </fields>
1110                 <links>
1111                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1112                 </links>
1113         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1114             <actions>
1115                 <retrieve/>
1116             </actions>
1117         </permacrud>
1118         </class>
1119
1120         <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">
1121                 <fields>
1122                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1123                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1124                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1125                 </fields>
1126                 <links>
1127                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1128                 </links>
1129         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1130             <actions>
1131                 <retrieve/>
1132             </actions>
1133         </permacrud>
1134         </class>
1135
1136         <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">
1137                 <fields oils_persist:primary="id">
1138                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1139                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1140                 </fields>
1141                 <links>
1142                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1143                 </links>
1144         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1145             <actions>
1146                 <retrieve/>
1147             </actions>
1148         </permacrud>
1149         </class>
1150
1151         <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">
1152                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1153                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1154                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1155                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1156                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1157                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1158                 </fields>
1159                 <links>
1160                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1161                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1162                 </links>
1163         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1164             <actions>
1165                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1166                 <retrieve/>
1167                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1168                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1169             </actions>
1170         </permacrud>
1171         </class>
1172
1173         <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">
1174                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1175                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1176                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1177                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1178                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1179                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1180                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1181                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1182             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1183             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1184             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1185                 </fields>
1186                 <links>
1187                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1188                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1189                 </links>
1190         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1191             <actions>
1192                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1193                 <retrieve/>
1194                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1195                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1196             </actions>
1197         </permacrud>
1198         </class>
1199
1200         <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">
1201                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1202                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1203                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1204                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1205                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1206                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1207                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1208                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1209                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1210                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1211                 </fields>
1212                 <links>
1213                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1214                 </links>
1215         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1216             <actions>
1217                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1218                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1219                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1220                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1221             </actions>
1222         </permacrud>
1223         </class>
1224
1225     <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">
1226         <fields oils_persist:primary="name">
1227             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1228             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1229             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1230             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1231             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1232             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1233             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1234             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1235             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1236             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1237         </fields>
1238         <links>
1239             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1240             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1241         </links>
1242         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1243             <actions>
1244                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1245                 <retrieve/>
1246                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1247                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1248             </actions>
1249         </permacrud>
1250     </class>
1251
1252     <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">
1253         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1254             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1255             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1256             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1257             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1258             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1259             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1260             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1261         </fields>
1262         <links>
1263             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1264         </links>
1265         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1266             <actions>
1267                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1268                 <retrieve/>
1269                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1270                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1271             </actions>
1272         </permacrud>
1273     </class>
1274
1275     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1276                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1277                         oils_persist:tablename="config.z3950_index_field_map" 
1278                         reporter:label="Z39.50 Index Field Map">
1279         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1280             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1281             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1282             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1283             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1284             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1285             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1286         </fields>
1287         <links>
1288             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1289             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1290             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1291         </links>
1292         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1293             <actions>
1294                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1295                 <retrieve/>
1296                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1297                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1298             </actions>
1299         </permacrud>
1300     </class>
1301
1302
1303         <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">
1304                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1305                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1306                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1307                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1308                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1309                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1310                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1311                 </fields>
1312                 <links>
1313             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1314             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1315                 </links>
1316                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1317                         <actions>
1318                                 <retrieve/>
1319                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1320                         </actions>
1321                 </permacrud>
1322         </class>
1323
1324         <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">
1325                 <fields oils_persist:primary="key">
1326                         <field reporter:label="Hook Key" name="key" reporter:datatype="text" reporter:selector="key"/>
1327                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1328                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1329                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1330                 </fields>
1331                 <links/>
1332                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1333                         <actions>
1334                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1335                                 <retrieve/>
1336                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1337                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1338                         </actions>
1339                 </permacrud>
1340         </class>
1341
1342         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1343                 <fields oils_persist:primary="module">
1344                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1345                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1346                 </fields>
1347                 <links/>
1348         </class>
1349
1350         <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">
1351                 <fields oils_persist:primary="module">
1352                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1353                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1354                 </fields>
1355                 <links/>
1356                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1357                         <actions>
1358                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1359                                 <retrieve/>
1360                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1361                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1362                         </actions>
1363                 </permacrud>
1364         </class>
1365
1366         <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">
1367                 <fields oils_persist:primary="module">
1368                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1369                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1370                 </fields>
1371                 <links/>
1372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1373                         <actions>
1374                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1375                                 <retrieve/>
1376                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1377                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1378                         </actions>
1379                 </permacrud>
1380         </class>
1381
1382         <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">
1383                 <fields oils_persist:primary="module">
1384                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1385                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1386                 </fields>
1387                 <links/>
1388                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1389                         <actions>
1390                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1391                                 <retrieve/>
1392                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1393                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1394                         </actions>
1395                 </permacrud>
1396         </class>
1397
1398         <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">
1399                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1400                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1401                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1402                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1403                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1404                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1405                 </fields>
1406                 <links>
1407                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1408                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1409                 </links>
1410                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1411                         <actions>
1412                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1413                     <context link="event_def" field="owner"/>
1414                 </create>
1415                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1416                     <context link="event_def" field="owner"/>
1417                 </retrieve>
1418                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1419                     <context link="event_def" field="owner"/>
1420                 </update>
1421                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1422                     <context link="event_def" field="owner"/>
1423                 </delete>
1424                         </actions>
1425                 </permacrud>
1426         </class>
1427
1428         <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">
1429                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1430                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1431                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1432                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1433                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1434                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1435                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1436                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1437                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1438                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1439                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1440                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1441                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1442                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1443                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1444                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1445                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1446                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1447                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1448                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1449                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1450                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1451                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1452                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1453                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1454                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1455                 </fields>
1456                 <links>
1457                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1458                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1459                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1460                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1461                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1462                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1463                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1464                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1465                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1466                 </links>
1467                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1468                         <actions>
1469                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1470                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1471                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1472                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1473                         </actions>
1474                 </permacrud>
1475         </class>
1476
1477         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1478                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1479                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1480                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1481                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1482                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1483                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1484                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1485                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1486                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1487                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1488                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1489                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1490                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1491                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1492                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1493                 </fields>
1494                 <links>
1495                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1496                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1497                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1498                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1499                 </links>
1500         </class>
1501
1502         <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">
1503                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1504                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1505                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1506                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1507                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1508                 </fields>
1509                 <links>
1510                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1511                 </links>
1512                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1513                         <actions>
1514                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1515                     <context link="event_def" field="owner"/>
1516                 </create>
1517                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1518                     <context link="event_def" field="owner"/>
1519                 </retrieve>
1520                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1521                     <context link="event_def" field="owner"/>
1522                 </update>
1523                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1524                     <context link="event_def" field="owner"/>
1525                 </delete>
1526                         </actions>
1527                 </permacrud>
1528         </class>
1529
1530         <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">
1531                 <oils_persist:source_definition><![CDATA[
1532                 SELECT  atevdef.hook,
1533                         atevdef.name,
1534                         atevdef.reactor,
1535                         atev.id,
1536                         atev.event_def,
1537                         atev.add_time,
1538                         atev.run_time,
1539                         atev.start_time,
1540                         atev.update_time,
1541                         atev.complete_time,
1542                         atev.update_process,
1543                         atev.state,
1544                         atev.user_data,
1545                         atev.template_output,
1546                         atev.error_output,
1547                         atev.async_output,
1548                         targ_circ.id AS target_circ,
1549                         targ_ahr.id AS target_hold,
1550                         COALESCE(
1551                                 targ_circ.circ_lib,
1552                                 targ_ahr.pickup_lib
1553                         ) AS perm_lib
1554                 FROM action_trigger.event atev
1555                 JOIN action_trigger.event_definition atevdef ON
1556                         (atevdef.id = atev.event_def)
1557                 JOIN action_trigger.hook ath ON
1558                         (ath.key = atevdef.hook)
1559                 LEFT JOIN action.circulation targ_circ ON
1560                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1561                 LEFT JOIN action.hold_request targ_ahr ON
1562                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1563                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1564                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1565                                 'circ.staff.max_visible_event_age',
1566                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1567                         ) UNION
1568                         SELECT '1000 YEARS'::INTERVAL AS value
1569                 ) ous)
1570                 ]]></oils_persist:source_definition>
1571                 <fields oils_persist:primary="id">
1572                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1573                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1574                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1575                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1576                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1577                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1578                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1579                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1580                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1581                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1582                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1583                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1584                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1585                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1586                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1587                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1588                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1589                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1590                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1591                 </fields>
1592                 <links>
1593                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1594                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1595                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1596                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1597                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1598                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1599                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1600                 </links>
1601                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1602                         <actions>
1603                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1604                         </actions>
1605                 </permacrud>
1606         </class>
1607
1608         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1609                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1610                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1611                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1612                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1613                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1614                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1615                 </fields>
1616                 <links>
1617                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1618                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1619                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1620                 </links>
1621                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1622                         <actions>
1623                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1624                         </actions>
1625                 </permacrud>
1626         </class>
1627
1628         <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">
1629                 <fields oils_persist:primary="code">
1630                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1631                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1632                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1633                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1634                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1635                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1636                 </fields>
1637                 <links/>
1638         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1639             <actions>
1640                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1641                 <retrieve/>
1642                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1643                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1644             </actions>
1645         </permacrud>
1646         </class>
1647
1648         <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">
1649                 <fields oils_persist:primary="code">
1650                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1651                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1652                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1653                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1654                 </fields>
1655                 <links/>
1656         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1657             <actions>
1658                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1659                 <retrieve/>
1660                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1661                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1662             </actions>
1663         </permacrud>
1664         </class>
1665
1666         <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">
1667                 <fields oils_persist:primary="code">
1668                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1669                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1670                 </fields>
1671                 <links/>
1672         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1673             <actions>
1674                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1675                 <retrieve/>
1676                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1677                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1678             </actions>
1679         </permacrud>
1680         </class>
1681
1682         <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">
1683                 <fields oils_persist:primary="code">
1684                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1685                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1686                 </fields>
1687                 <links/>
1688         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1689             <actions>
1690                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1691                 <retrieve/>
1692                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1693                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1694             </actions>
1695         </permacrud>
1696         </class>
1697
1698         <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">
1699                 <fields oils_persist:primary="code">
1700                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1701                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1702                 </fields>
1703                 <links/>
1704         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1705             <actions>
1706                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1707                 <retrieve/>
1708                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1709                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1710             </actions>
1711         </permacrud>
1712         </class>
1713
1714         <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">
1715                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1716                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1717                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1718                 </fields>
1719                 <links/>
1720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1721             <actions>
1722                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1723                 <retrieve/>
1724                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1725                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1726             </actions>
1727         </permacrud>
1728         </class>
1729
1730         <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">
1731                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1732                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1733                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1734                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1735                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1736                 </fields>
1737         <links>
1738             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1739             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1740             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1741         </links>
1742         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1743             <actions>
1744                 <create permission="UPDATE_COPY">
1745                     <context link="target_copy" field="circ_lib"/>
1746                 </create>
1747                 <retrieve/>
1748                 <update permission="UPDATE_COPY">
1749                     <context link="target_copy" field="circ_lib"/>
1750                 </update>
1751                 <delete permission="UPDATE_COPY">
1752                     <context link="target_copy" field="circ_lib"/>
1753                 </delete>
1754             </actions>
1755         </permacrud>
1756         </class>
1757
1758         <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">
1759                 <fields oils_persist:primary="code">
1760                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1761                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1762                 </fields>
1763                 <links/>
1764         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1765             <actions>
1766                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1767                 <retrieve/>
1768                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1769                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1770             </actions>
1771         </permacrud>
1772         </class>
1773
1774         <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">
1775                 <fields oils_persist:primary="code">
1776                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1777                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1778                 </fields>
1779                 <links/>
1780         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1781             <actions>
1782                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1783                 <retrieve/>
1784                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1785                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1786             </actions>
1787         </permacrud>
1788         </class>
1789
1790         <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">
1791                 <fields oils_persist:primary="code">
1792                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1793                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1794                 </fields>
1795                 <links/>
1796         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1797             <actions>
1798                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1799                 <retrieve/>
1800                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1801                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1802             </actions>
1803         </permacrud>
1804         </class>
1805
1806     <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">
1807         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1808             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1809             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1810             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1811             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1812             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1813             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1814             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1815             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1816             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1817             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1818             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1819             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1820             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1821             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1822             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1823             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1824             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1825         </fields>
1826         <links/>
1827         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1828             <actions>
1829                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1830                 <retrieve/>
1831                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1832                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1833             </actions>
1834         </permacrud>
1835     </class>
1836
1837     <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">
1838         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1839             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1840             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1841             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1842             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1843             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1844             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1845             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1846             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1847             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1848             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1849             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1850             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1851             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1852             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1853             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1854             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1855             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1856             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1857             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1858         </fields>
1859         <links/>
1860         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1861             <actions>
1862                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1863                 <retrieve/>
1864                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1865                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1866             </actions>
1867         </permacrud>
1868     </class>
1869
1870     <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">
1871         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1872             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1873             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1874             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1875             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1876             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1877         </fields>
1878         <links>
1879             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1880             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1881             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1882         </links>
1883         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1884             <actions>
1885                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1886                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1887                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1888                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1889             </actions>
1890         </permacrud>
1891     </class>
1892
1893         <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">
1894                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1895                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1896                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1897                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1898                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1899                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1900                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1901                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1902                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1903                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1904                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1905                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1906                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1907                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1908                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1909                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1910                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1911             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1912                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1913                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1914                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1915                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1916                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1917                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1918                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1919                 </fields>
1920                 <links>
1921                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1922                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1923                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1924                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1925                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1926                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1927                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1928                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1929                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1930                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1931                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1932                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1933                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1934             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1935                 </links>
1936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1937             <actions>
1938                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1939                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1940                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1941                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1942             </actions>
1943         </permacrud>
1944         </class>
1945
1946         <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">
1947                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1948                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1949                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1950                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1951                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1952                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1953                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1954                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1955                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1956                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1957                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1958                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1959                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1960                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1961                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1962                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1963             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1964                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1965                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1966             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1967                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1968                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1969                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1970                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1971             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1972             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1973             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1974                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1975                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1976                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1977                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1978                 </fields>
1979                 <links>
1980                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1981                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1982                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1983                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1984                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1985                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1986                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1987                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1988                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1989                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1990                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1991                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1992                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1993                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1994             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1995                 </links>
1996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1997             <actions>
1998                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1999                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2000                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2001                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2002             </actions>
2003         </permacrud>
2004         </class>
2005
2006     <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">
2007         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
2008             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2009             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2010             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2011         </fields>
2012         <links/>
2013         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2014             <actions>
2015                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2016                 <retrieve/>
2017                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2018                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2019             </actions>
2020         </permacrud>
2021     </class>
2022
2023     <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">
2024         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
2025             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2026             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2027             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2028             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
2029             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
2030             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
2031             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2032         </fields>
2033         <links>
2034             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2035         </links>
2036         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2037             <actions>
2038                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2039                 <retrieve/>
2040                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2041                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2042             </actions>
2043         </permacrud>
2044     </class>
2045
2046     <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">
2047         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2048             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2049             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2050             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2051             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2052             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2053         </fields>
2054         <links>
2055             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2056             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2057         </links>
2058         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2059             <actions>
2060                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2061                     <context link="matchpoint" field="org_unit"/>
2062                 </create>
2063                 <retrieve/>
2064                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2065                     <context link="matchpoint" field="org_unit"/>
2066                 </update>
2067                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2068                     <context link="matchpoint" field="org_unit"/>
2069                 </delete>
2070             </actions>
2071         </permacrud>
2072     </class>
2073
2074     <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">
2075         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2076             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2077             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2078             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2079         </fields>
2080         <links>
2081             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2082             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2083         </links>
2084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2085             <actions>
2086                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2087                     <context link="limit_set" field="owning_lib"/>
2088                 </create>
2089                 <retrieve/>
2090                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2091                     <context link="limit_set" field="owning_lib"/>
2092                 </update>
2093                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2094                     <context link="limit_set" field="owning_lib"/>
2095                 </delete>
2096             </actions>
2097         </permacrud>
2098     </class>
2099     <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">
2100         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2101             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2102             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2103             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2104         </fields>
2105         <links>
2106             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2107             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2108         </links>
2109         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2110             <actions>
2111                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2112                     <context link="limit_set" field="owning_lib"/>
2113                 </create>
2114                 <retrieve/>
2115                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2116                     <context link="limit_set" field="owning_lib"/>
2117                 </update>
2118                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2119                     <context link="limit_set" field="owning_lib"/>
2120                 </delete>
2121             </actions>
2122         </permacrud>
2123     </class>
2124
2125     <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">
2126         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2127             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2128             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2129             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2130             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2131         </fields>
2132         <links>
2133             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2134             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2135         </links>
2136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2137             <actions>
2138                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2139                     <context link="limit_set" field="owning_lib"/>
2140                 </create>
2141                 <retrieve/>
2142                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2143                     <context link="limit_set" field="owning_lib"/>
2144                 </update>
2145                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2146                     <context link="limit_set" field="owning_lib"/>
2147                 </delete>
2148             </actions>
2149         </permacrud>
2150     </class>
2151
2152         <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">
2153                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2154                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2155                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2156                 </fields>
2157                 <links/>
2158         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2159             <actions>
2160                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2161                 <retrieve/>
2162                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2163                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2164             </actions>
2165         </permacrud>
2166         </class>
2167
2168         <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">
2169                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2170                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2171                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2172                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2173                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2174                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2175                 </fields>
2176                 <links>
2177                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2178                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2179                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2180                 </links>
2181         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2182             <actions>
2183                 <create permission="ADMIN_SURVEY">
2184                     <context link="survey" field="owner"/>
2185                 </create>
2186                 <retrieve/>
2187                 <update permission="ADMIN_SURVEY">
2188                     <context link="survey" field="owner"/>
2189                 </update>
2190                 <delete permission="ADMIN_SURVEY">
2191                     <context link="survey" field="owner"/>
2192                 </delete>
2193             </actions>
2194         </permacrud>
2195         </class>
2196         <class id="mbts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
2197                 <fields oils_persist:primary="id" oils_persist:sequence="">
2198                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2199                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2200                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2201                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2202                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2203                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2204                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2205                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2206                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2207                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2208                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2209                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2210                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2211                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2212                 </fields>
2213                 <links>
2214                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2215                 </links>
2216                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2217                         <actions>
2218                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2219                                         <context link="usr" field="home_ou" />
2220                                 </retrieve>
2221                         </actions>
2222                 </permacrud>
2223         </class>
2224         <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">
2225                 <fields oils_persist:primary="id" oils_persist:sequence="">
2226                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2227                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2228                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2229                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2230                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2231                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2232                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2233                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2234                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2235                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2236                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2237                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2238                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2239                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2240                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2241                 </fields>
2242                 <links>
2243                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2244                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2245                 </links>
2246         </class>
2247         <class id="aum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message" reporter:label="User Message">
2248                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2249                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2250                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2251                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2252                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2253                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2254                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2255                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2256                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2257                 </fields>
2258                 <links>
2259                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2260                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2261                 </links>
2262                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2263                         <actions> <!-- created magically, so no create action -->
2264                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2265                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2266                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2267                         </actions>
2268                 </permacrud>
2269         </class>
2270         <class id="auml" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_limited" oils_persist:tablename="actor.usr_message_limited" reporter:label="User Message (Limited Access)">
2271                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2272                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2273                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2274                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2275                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2276                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2277                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2278                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2279                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2280                 </fields>
2281                 <links>
2282                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2283                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2284                 </links>
2285                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2286                         <actions> <!-- created magically, so no create action -->
2287                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2288                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2289                         </actions>
2290                 </permacrud>
2291         </class>
2292         <class id="aun" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2293                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2294                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2295                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2296                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2297                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2298                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2299                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2300                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2301                 </fields>
2302                 <links>
2303                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2304                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2305                 </links>
2306         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2307             <actions>
2308                 <create permission="UPDATE_USER" context_field="owner">
2309                     <context link="usr" field="home_ou"/>
2310                 </create>
2311                                 <!-- note: public notes are still accessible via API -->
2312                 <retrieve permission="UPDATE_USER">
2313                     <context link="usr" field="home_ou"/>
2314                                 </retrieve>
2315                 <update permission="UPDATE_USER">
2316                     <context link="usr" field="home_ou"/>
2317                                 </update>
2318                 <delete permission="UPDATE_USER">
2319                     <context link="usr" field="home_ou"/>
2320                                 </delete>
2321             </actions>
2322         </permacrud>
2323         </class>
2324         <class id="aupw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_privacy_waiver" oils_persist:tablename="actor.usr_privacy_waiver" reporter:label="Privacy Waiver">
2325                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_privacy_waiver_id_seq">
2326                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2327                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2328                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2329                         <field reporter:label="Place Holds?" name="place_holds" reporter:datatype="bool" />
2330                         <field reporter:label="Pick Up Holds?" name="pickup_holds" reporter:datatype="bool" />
2331                         <field reporter:label="View Borrowing History?" name="view_history" reporter:datatype="bool" />
2332                         <field reporter:label="Check Out Items?" name="checkout_items" reporter:datatype="bool" />
2333                 </fields>
2334                 <links>
2335                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2336                 </links>
2337                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2338                         <actions>
2339                                 <create permission="UPDATE_USER">
2340                                         <context link="usr" field="home_ou"/>
2341                                 </create>
2342                                 <retrieve permission="VIEW_USER">
2343                                         <context link="usr" field="home_ou"/>
2344                                 </retrieve>
2345                                 <update permission="UPDATE_USER">
2346                                         <context link="usr" field="home_ou"/>
2347                                 </update>
2348                                 <delete permission="UPDATE_USER">
2349                                         <context link="usr" field="home_ou"/>
2350                                 </delete>
2351                         </actions>
2352                 </permacrud>
2353         </class>
2354         <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">
2355                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2356                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2357                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2358                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2359                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2360                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2361                 </fields>
2362                 <links>
2363                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2364                 </links>
2365         </class>
2366         <class id="aus" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2367                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2368                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2369                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2370                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2371                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2372                 </fields>
2373                 <links>
2374                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2375                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2376                 </links>
2377                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2378                         <actions>
2379                                 <retrieve permission="VIEW_USER">
2380                                         <context link="usr" field="home_ou" />
2381                                 </retrieve>
2382                         </actions>
2383                 </permacrud>
2384         </class>
2385         <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">
2386                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2387                         <field name="field" reporter:datatype="link"/>
2388                         <field name="id" reporter:datatype="id" />
2389                         <field name="source" reporter:datatype="link"/>
2390                         <field name="value" reporter:datatype="text"/>
2391                 </fields>
2392                 <links>
2393                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2394                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2395                 </links>
2396         </class>
2397         <class id="aihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
2398                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2399                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2400                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2401                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2402                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2403                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2404                 </fields>
2405                 <links>
2406                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2407                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2408                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2409                 </links>
2410                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2411                         <actions>
2412                                 <retrieve/>
2413                         </actions>
2414                 </permacrud>
2415         </class>
2416         <class id="ancihu" controller="open-ils.cstore open-ils.pcrud" 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">
2417                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2418                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2419                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2420                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2421                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2422                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2423                 </fields>
2424                 <links>
2425                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2426                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2427                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2428                 </links>
2429                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2430                         <actions>
2431                                 <retrieve/>
2432                         </actions>
2433                 </permacrud>
2434         </class>
2435         <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">
2436                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2437                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2438                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2439                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2440                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2441                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2442                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2443                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2444                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2445                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2446                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2447                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2448                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2449                 </fields>
2450                 <links>
2451                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2452                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2453                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2454                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2455                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2456                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2457                 </links>
2458         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2459             <actions>
2460                 <create permission="TRANSIT_COPY" context_field="owner">
2461                     <context link="target_copy" field="circ_lib"/>
2462                 </create>
2463                 <retrieve/>
2464                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2465                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2466             </actions>
2467         </permacrud>
2468         </class>
2469         <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">
2470                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2471                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2472                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2473                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2474                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2475                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2476                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2477                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2478                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2479                 </fields>
2480                 <links>
2481                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2482                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2483                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2484                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2485                 </links>
2486         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2487             <actions>
2488                 <create permission="ADMIN_SURVEY">
2489                     <context link="survey" field="owner"/>
2490                 </create>
2491                 <retrieve permission="VIEW_USER">
2492                     <context link="usr" field="home_ou"/>
2493                 </retrieve>
2494                 <update permission="ADMIN_SURVEY">
2495                     <context link="survey" field="owner"/>
2496                 </update>
2497                 <delete permission="ADMIN_SURVEY">
2498                     <context link="survey" field="owner"/>
2499                 </delete>
2500             </actions>
2501         </permacrud>
2502         </class>
2503         <class id="ccbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2504                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2505                         <field name="bucket" />
2506                         <field name="id" reporter:datatype="id" />
2507                         <field name="target_copy" reporter:datatype="link"/>
2508                         <field name="create_time" reporter:datatype="timestamp" />
2509                         <field name="pos" reporter:datatype="int" />
2510                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2511                 </fields>
2512                 <links>
2513                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2514                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2515             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2516                 </links>
2517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2518                         <actions>
2519                                 <retrieve permission="ADMIN_COPY_BUCKET">
2520                     <context link="bucket" owning_lib="owning_lib"/>
2521                 </retrieve>
2522             </actions>
2523         </permacrud>
2524         </class>
2525         <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">
2526                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2527                         <field name="id" reporter:datatype="id" />
2528                         <field name="item" reporter:datatype="link"/>
2529                         <field name="note" reporter:datatype="text" />
2530                 </fields>
2531                 <links>
2532                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2533                 </links>
2534         </class>
2535
2536         <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">
2537                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2538                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2539                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2540                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2541                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2542                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2543                 </fields>
2544                 <links>
2545                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2546                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2547                 </links>
2548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2549                         <actions>
2550                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2551                                 <retrieve/>
2552                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2553                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2554                         </actions>
2555                 </permacrud>
2556         </class>
2557
2558         <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">
2559                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2560                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2561                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2562                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2563                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2564                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2565                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2566                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2567                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2568                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2569                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2570                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2571                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2572                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2573                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2574                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2575                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2576                 </fields>
2577                 <links>
2578                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2579                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2580                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2581                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2582                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2583                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2584                         <link field="heading" reltype="has_a" key="id" map="" class="ahf"/>
2585                 </links>
2586                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2587                         <actions>
2588                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2589                                 <retrieve/>
2590                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2591                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2592                         </actions>
2593                 </permacrud>
2594         </class>
2595
2596         <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">
2597                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2598                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2599                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2600                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2601                 </fields>
2602                 <links>
2603                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2604                 </links>
2605                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2606                         <actions>
2607                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2608                                 <retrieve/>
2609                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2610                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2611                         </actions>
2612                 </permacrud>
2613         </class>
2614
2615         <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">
2616                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2617                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2618                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2619                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2620                 </fields>
2621                 <links>
2622                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2623                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2624                 </links>
2625                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2626                         <actions>
2627                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2628                                 <retrieve/>
2629                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2630                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2631                         </actions>
2632                 </permacrud>
2633         </class>
2634
2635         <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">
2636                 <fields oils_persist:primary="code">
2637                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2638                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2639                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2640                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2641                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2642                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2643                 </fields>
2644                 <links>
2645                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2646                 </links>
2647                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2648                         <actions>
2649                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2650                                 <retrieve/>
2651                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2652                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2653                         </actions>
2654                 </permacrud>
2655         </class>
2656
2657         <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">
2658                 <fields oils_persist:primary="code">
2659                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2660                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2661                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2662                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2663                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2664                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2665                 </fields>
2666                 <links>
2667                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2668                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2669                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2670                 </links>
2671                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2672                         <actions>
2673                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2674                                 <retrieve/>
2675                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2676                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2677                         </actions>
2678                 </permacrud>
2679         </class>
2680
2681     <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">
2682         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2683             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2684             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2685             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2686         </fields>
2687         <links>
2688             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2689             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2690         </links>
2691         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2692             <actions>
2693                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2694                 <retrieve/>
2695                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2696                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2697             </actions>
2698         </permacrud>
2699     </class>
2700
2701         <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">
2702                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2703                         <field name="active" reporter:datatype="bool"/>
2704                         <field name="create_date" reporter:datatype="timestamp"/>
2705                         <field name="creator" />
2706                         <field name="deleted" reporter:datatype="bool"/>
2707                         <field name="edit_date" reporter:datatype="timestamp"/>
2708                         <field name="editor" />
2709                         <field name="id" reporter:datatype="id" />
2710                         <field name="last_xact_id" />
2711                         <field name="marc" />
2712                         <field name="source" />
2713                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2714                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2715                         <field name="heading" />
2716                         <field name="simple_heading" />
2717                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2718                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2719                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2720                 </fields>
2721                 <links>
2722                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2723                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2724                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2725                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2726                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2727                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2728                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2729                 </links>
2730                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2731                         <actions>
2732                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2733                                 <retrieve/>
2734                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2735                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2736                         </actions>
2737                 </permacrud>
2738         </class>
2739         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2740                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2741                         <field name="char_encoding" />
2742                         <field name="id" />
2743                         <field name="record" />
2744                         <field name="record_status" />
2745                         <field name="thesaurus" />
2746                 </fields>
2747                 <links>
2748                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2749                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2750                 </links>
2751         </class>
2752         <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">
2753                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2754                         <field name="id" reporter:datatype="id" />
2755                         <field name="bib" reporter:datatype="link" />
2756                         <field name="authority" reporter:datatype="link" />
2757                 </fields>
2758                 <links>
2759                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2760                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2761                 </links>
2762         </class>
2763         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2764                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2765                         <field name="id" reporter:datatype="id" />
2766                         <field name="record" reporter:datatype="link" />
2767                         <field name="atag" reporter:datatype="link" />
2768                         <field name="value" reporter:datatype="text" />
2769                 </fields>
2770                 <links>
2771                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2772                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2773                 </links>
2774         </class>
2775
2776         <class id="ahf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::heading_field" oils_persist:tablename="authority.heading_field" reporter:label="Authority Heading Fields">
2777                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2778                         <field name="id" reporter:datatype="id" />
2779                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2780                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2781                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2782                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2783                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2784                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2785                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2786                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2787                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2788                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2789                 </fields>
2790                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2791                         <actions>
2792                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2793                                 <retrieve/>
2794                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2795                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2796                         </actions>
2797                 </permacrud>
2798         </class>
2799
2800         <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">
2801                 <fields oils_persist:primary="code" oils_persist:sequence="">
2802                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2803                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2804                 </fields>
2805                 <links/>
2806         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2807             <actions>
2808                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2809                 <retrieve/>
2810                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2811                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2812             </actions>
2813         </permacrud>
2814         </class>
2815         <class id="mccp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2816                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2817                         <field name="accepting_usr" />
2818                         <field name="amount" reporter:datatype="money" />
2819                         <field name="amount_collected" reporter:datatype="money" />
2820                         <field name="approval_code" reporter:datatype="text"/>
2821                         <field name="cash_drawer" reporter:datatype="link"/>
2822                         <field name="cc_number" reporter:datatype="text"/>
2823                         <field name="cc_order_number" reporter:datatype="text"/>
2824                         <field name="cc_processor" reporter:datatype="text"/>
2825                         <field name="id" reporter:datatype="id" />
2826                         <field name="note" reporter:datatype="text"/>
2827                         <field name="payment_ts" reporter:datatype="timestamp"/>
2828                         <field name="xact" reporter:datatype="link"/>
2829                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2830                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2831                 </fields>
2832                 <links>
2833                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2834                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2835                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2836                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2837                 </links>
2838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2839             <actions>
2840                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2841                     <context link="xact" jump="usr" field="home_ou"/>
2842                 </retrieve>
2843                         </actions>
2844                 </permacrud>
2845         </class>
2846         <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" oils_persist:field_safe="true">
2847                 <fields oils_persist:primary="name">
2848                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2849                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2850                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2851                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2852                 </fields>
2853                 <links/>
2854         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2855             <actions>
2856                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2857                 <retrieve/>
2858                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2859                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2860             </actions>
2861         </permacrud>
2862         </class>
2863
2864         <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">
2865                 <fields oils_persist:primary="alias">
2866                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2867                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2868                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2869                 </fields>
2870                 <links>
2871                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2872                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2873                 </links>
2874         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2875             <actions>
2876                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2877                 <retrieve/>
2878                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2879                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2880             </actions>
2881         </permacrud>
2882         </class>
2883
2884         <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">
2885                 <fields oils_persist:primary="name">
2886                         <field reporter:label="Name" name="name" reporter:datatype="text" reporter:selector="label"/>
2887                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2888                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2889                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2890                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2891                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2892                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2893                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2894                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2895                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2896                 </fields>
2897                 <links>
2898                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2899                 </links>
2900         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2901             <actions>
2902                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2903                 <retrieve/>
2904                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2905                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2906             </actions>
2907         </permacrud>
2908         </class>
2909
2910         <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">
2911                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2912                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2913                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2914                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2915                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2916                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2917                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2918                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
2919                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2920                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2921                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2922                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2923                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
2924                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
2925                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2926                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2927                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
2928                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
2929                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2930                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
2931                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link"/>
2932                 </fields>
2933                 <links>
2934                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
2935                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2936                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
2937                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
2938                 </links>
2939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2940             <actions>
2941                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2942                 <retrieve/>
2943                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2944                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2945             </actions>
2946         </permacrud>
2947         </class>
2948
2949         <class id="cmfvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_virtual_map" oils_persist:tablename="config.metabib_field_virtual_map" reporter:label="Metabib Field Virtual Map" oils_persist:field_safe="true">
2950                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
2951                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2952                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
2953                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link"/>
2954                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
2955                 </fields>
2956                 <links>
2957                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
2958                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
2959                 </links>
2960         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2961             <actions>
2962                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2963                 <retrieve/>
2964                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2965                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2966             </actions>
2967         </permacrud>
2968         </class>
2969
2970         <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">
2971                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2972                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2973                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2974                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2975                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2976                         <field reporter:label="Owning Lib to Patron Home Lib Proximity" name="owning_lib_to_home_lib_prox" reporter:datatype="int" />
2977                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2978                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2979                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2980                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2981                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2982                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2983                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2984                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2985                 </fields>
2986                 <links>
2987                 </links>
2988                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2989                         <actions>
2990                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2991                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2992                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2993                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2994                         </actions>
2995                 </permacrud>
2996         </class>
2997         <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">
2998                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2999                         <field name="id" reporter:datatype="id" />
3000                         <field name="name" reporter:datatype="text"/>
3001                         <field name="xpath" reporter:datatype="text"/>
3002                         <field name="format" reporter:datatype="link"/>
3003                         <field name="first_word" reporter:datatype="bool" />
3004                 </fields>
3005                 <links/>
3006         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3007             <actions>
3008                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
3009                 <retrieve/>
3010                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
3011                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
3012             </actions>
3013         </permacrud>
3014         </class>
3015         <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">
3016                 <fields oils_persist:primary="code" oils_persist:sequence="">
3017                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3018                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
3019                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3020                 </fields>
3021                 <links/>
3022         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3023             <actions>
3024                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3025                 <retrieve/>
3026                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3027                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3028             </actions>
3029         </permacrud>
3030         </class>
3031         <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">
3032                 <fields oils_persist:primary="code" oils_persist:sequence="">
3033                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3034                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3035                 </fields>
3036                 <links/>
3037         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3038             <actions>
3039                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3040                 <retrieve/>
3041                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3042                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3043             </actions>
3044         </permacrud>
3045         </class>
3046     <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">
3047         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
3048             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
3049             <field reporter:label="Name" name="name" reporter:datatype="text"/>
3050             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
3051             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
3052         </fields>
3053         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3054             <actions>
3055                 <retrieve/>
3056             </actions>
3057         </permacrud>
3058     </class>
3059         <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">
3060                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
3061                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3062                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3063                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3064                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3065                 </fields>
3066                 <links>
3067                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3068                 </links>
3069         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3070             <actions>
3071                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3072                 <retrieve/>
3073                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3074                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
3075             </actions>
3076         </permacrud>
3077         </class>
3078         <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">
3079                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
3080                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3081                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3082                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3083                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3084                 </fields>
3085                 <links>
3086                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3087                 </links>
3088         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3089             <actions>
3090                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3091                 <retrieve/>
3092                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3093                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3094             </actions>
3095         </permacrud>
3096         </class>
3097         <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">
3098                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3099                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3100                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3101                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3102                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3103                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3104                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3105                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3106                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3107                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3108                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3109                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3110                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3111                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3112                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3113                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3114                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3115                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3116                 </fields>
3117                 <links>
3118                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3119                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3120                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3121                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3122                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3123                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3124                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3125                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3126                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3127                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3128                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3129                 </links>
3130         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3131             <actions>
3132                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3133                 <retrieve/>
3134                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3135                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3136             </actions>
3137         </permacrud>
3138         </class>
3139         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3140                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3141                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3142                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3143                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3144                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3145                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3146                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3147                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3148                 </fields>
3149                 <links>
3150                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3151                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3152         </links>
3153         </class>
3154         <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">
3155                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3156                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3157                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3158                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3159                 </fields>
3160                 <links>
3161                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3162                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3163                 </links>
3164         </class>
3165         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3166                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3167                         <field name="id" reporter:datatype="id" />
3168                         <field name="value" oils_persist:i18n="true" />
3169                 </fields>
3170                 <links/>
3171         </class>
3172         <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">
3173                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3174                         <field name="balance_owed" reporter:datatype="money" />
3175                         <field name="total_owed" reporter:datatype="money" />
3176                         <field name="total_paid" reporter:datatype="money" />
3177                         <field name="usr" reporter:datatype="link"/>
3178                 </fields>
3179                 <links>
3180                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3181         </links>
3182         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3183             <actions>
3184                 <retrieve permission="VIEW_USER">
3185                     <context link="usr" field="home_ou"/>
3186                 </retrieve>
3187             </actions>
3188         </permacrud>
3189         </class>
3190         <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">
3191                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3192                         <field name="collector" />
3193                         <field name="enter_time" reporter:datatype="timestamp"/>
3194                         <field name="id" reporter:datatype="id" />
3195                         <field name="location" reporter:datatype="link"/>
3196                         <field name="usr" reporter:datatype="link"/>
3197                 </fields>
3198                 <links>
3199                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3200                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3201                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3202                 </links>
3203         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3204             <actions>
3205                 <create permission="money.collections_tracker.create" context_field="location"/>
3206                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3207                 <delete permission="money.collections_tracker.create" context_field="location"/>
3208             </actions>
3209         </permacrud>
3210         </class>
3211         <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">
3212                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3213                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3214                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3215                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3216                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3217                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3218                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3219                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3220                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3221                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3222                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3223                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3224                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3225                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3226                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3227                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3228                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3229                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3230                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3231                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3232                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3233                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3234                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3235                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3236                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3237                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3238                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3239                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3240                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3241                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3242                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3243                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3244                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3245                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3246                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3247                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3248                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3249                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3250                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3251                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3252                 </fields>
3253                 <links>
3254                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3255                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3256                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3257                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3258                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3259                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3260                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3261                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3262                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3263                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3264                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3265                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3266                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3267                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3268                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3269                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3270                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3271                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3272                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3273                         <link field="mattrs" reltype="has_many" key="id" map="" class="mraf"/>
3274                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3275                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3276                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3277                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3278                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3279                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3280                 </links>
3281         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3282             <actions>
3283                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3284                 <retrieve/>
3285                 <update permission="UPDATE_MARC" global_required="true"/>
3286                 <!-- WARNING: Deleting records via PCRUD does NOT check that any prerequisite conditions have been handled first. It is your responsibility to check for those conditions before deleting bib records. -->
3287                 <delete permission="DELETE_RECORD" global_required="true"/>
3288             </actions>
3289         </permacrud>
3290         </class>
3291         <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">
3292                 <fields oils_persist:primary="id">
3293                         <field name="dow_0_close" />
3294                         <field name="dow_0_open" />
3295                         <field name="dow_1_close" />
3296                         <field name="dow_1_open" />
3297                         <field name="dow_2_close" />
3298                         <field name="dow_2_open" />
3299                         <field name="dow_3_close" />
3300                         <field name="dow_3_open" />
3301                         <field name="dow_4_close" />
3302                         <field name="dow_4_open" />
3303                         <field name="dow_5_close" />
3304                         <field name="dow_5_open" />
3305                         <field name="dow_6_close" />
3306                         <field name="dow_6_open" />
3307                         <field name="id" reporter:datatype="id" />
3308                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3309                 </fields>
3310                 <links>
3311                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3312                 </links>
3313         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3314             <actions>
3315                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3316                 <retrieve/>
3317                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3318                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3319             </actions>
3320         </permacrud>
3321         </class>
3322         <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">
3323                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3324                         <field name="id" reporter:datatype="id" />
3325                         <field name="record" reporter:datatype="link"/>
3326                         <field name="label" reporter:datatype="text"/>
3327                         <field name="label_sortkey" reporter:datatype="text"/>
3328                         <field name="deleted" reporter:datatype="bool"/>
3329                 </fields>
3330                 <links>
3331                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3332                 </links>
3333         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3334             <actions>
3335                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3336                 <retrieve/>
3337                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3338                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3339             </actions>
3340         </permacrud>
3341         </class>
3342         <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">
3343                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3344                         <field name="id" reporter:datatype="id" />
3345                         <field name="target_copy" reporter:datatype="link" />
3346                         <field name="part" reporter:datatype="link"/>
3347                 </fields>
3348                 <links>
3349                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3350                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3351                 </links>
3352         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3353             <actions>
3354                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3355                 <retrieve/>
3356                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3357                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3358             </actions>
3359         </permacrud>
3360         </class>
3361     <class  id="aecc"
3362             controller="open-ils.cstore open-ils.pcrud"
3363             oils_obj:fieldmapper="action::emergency_closing_circulation"
3364             oils_persist:tablename="action.emergency_closing_circulation"
3365             reporter:label="Emergency Closing Circulation Entry"
3366             oils_persist:readonly="true"
3367     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3368         <fields oils_persist:primary="id">
3369             <field name="id" reporter:datatype="id" />
3370             <field name="circulation" reporter:datatype="link" />
3371                         <field name="emergency_closing" reporter:datatype="link"/>
3372             <field name="original_due_date" reporter:datatype="timestamp" />
3373             <field name="process_time" reporter:datatype="timestamp" />
3374         </fields>
3375         <links>
3376             <link field="circulation" reltype="has_a" key="id" map="" class="circ"/>
3377             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3378         </links>
3379         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3380             <actions>
3381                 <retrieve/>
3382             </actions>
3383         </permacrud>
3384     </class>
3385     <class  id="aecr"
3386             controller="open-ils.cstore open-ils.pcrud"
3387             oils_obj:fieldmapper="action::emergency_closing_reservation"
3388             oils_persist:tablename="action.emergency_closing_reservation"
3389             reporter:label="Emergency Closing Reservation Entry"
3390             oils_persist:readonly="true"
3391     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3392         <fields oils_persist:primary="id">
3393             <field name="id" reporter:datatype="id" />
3394             <field name="reservation" reporter:datatype="link" />
3395                         <field name="emergency_closing" reporter:datatype="link"/>
3396             <field name="original_end_time" reporter:datatype="timestamp" />
3397             <field name="process_time" reporter:datatype="timestamp" />
3398         </fields>
3399         <links>
3400             <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3401             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3402         </links>
3403         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3404             <actions>
3405                 <retrieve/>
3406             </actions>
3407         </permacrud>
3408     </class>
3409     <class  id="aech"
3410             controller="open-ils.cstore open-ils.pcrud"
3411             oils_obj:fieldmapper="action::emergency_closing_hold"
3412             oils_persist:tablename="action.emergency_closing_hold"
3413             reporter:label="Emergency Closing Hold Entry"
3414             oils_persist:readonly="true"
3415     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3416         <fields oils_persist:primary="id">
3417             <field name="id" reporter:datatype="id" />
3418             <field name="hold" reporter:datatype="link" />
3419                         <field name="emergency_closing" reporter:datatype="link"/>
3420             <field name="original_shelf_expire_time" reporter:datatype="timestamp" />
3421             <field name="process_time" reporter:datatype="timestamp" />
3422         </fields>
3423         <links>
3424             <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3425             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3426         </links>
3427         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3428             <actions>
3429                 <retrieve/>
3430             </actions>
3431         </permacrud>
3432     </class>
3433     <class  id="aecs"
3434             controller="open-ils.cstore open-ils.pcrud"
3435             oils_obj:fieldmapper="action::emergency_closing_status"
3436             oils_persist:tablename="action.emergency_closing_status"
3437             reporter:label="Emergency Closing Status"
3438             oils_persist:readonly="true"
3439     >
3440         <fields oils_persist:primary="id">
3441             <field name="id" reporter:datatype="id" />
3442             <field name="creator" reporter:datatype="link" />
3443             <field name="create_time" reporter:datatype="timestamp" />
3444             <field name="process_start_time" reporter:datatype="timestamp" />
3445             <field name="process_end_time" reporter:datatype="timestamp" />
3446             <field name="last_update_time" reporter:datatype="timestamp" />
3447             <field name="circulations" reporter:datatype="int" />
3448             <field name="circulations_complete" reporter:datatype="int" />
3449             <field name="reservations" reporter:datatype="int" />
3450             <field name="reservations_complete" reporter:datatype="int" />
3451             <field name="holds" reporter:datatype="int" />
3452             <field name="holds_complete" reporter:datatype="int" />
3453         </fields>
3454         <links>
3455             <link field="id" reltype="has_a" key="id" map="" class="aec"/>
3456         </links>
3457         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3458             <actions>
3459                 <retrieve/>
3460             </actions>
3461         </permacrud>
3462     </class>
3463     <class id="aec" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::emergency_closing" oils_persist:tablename="action.emergency_closing" reporter:label="Emergency Closing">
3464         <fields oils_persist:primary="id" oils_persist:sequence="action.emergency_closing_id_seq">
3465             <field name="id" reporter:datatype="id" />
3466             <field name="creator" reporter:datatype="link" />
3467             <field name="create_time" reporter:datatype="timestamp" />
3468             <field name="process_start_time" reporter:datatype="timestamp" />
3469             <field name="process_end_time" reporter:datatype="timestamp" />
3470             <field name="last_update_time" reporter:datatype="timestamp" />
3471             <field name="closing" oils_persist:virtual="true" reporter:datatype="link"/>
3472             <field name="status" oils_persist:virtual="true" reporter:datatype="link"/>
3473             <field name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3474             <field name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3475             <field name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3476         </fields>
3477         <links>
3478             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3479             <link field="closing" reltype="might_have" key="emergency_closing" map="" class="aoucd"/>
3480             <link field="status" reltype="might_have" key="id" map="" class="aecs"/>
3481             <link field="circulations" reltype="has_many" key="emergency_closing" map="" class="aecc"/>
3482             <link field="reservations" reltype="has_many" key="emergency_closing" map="" class="aecr"/>
3483             <link field="holds" reltype="has_many" key="emergency_closing" map="" class="aech"/>
3484         </links>
3485         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3486             <actions>
3487                 <create permission="EMERGENCY_CLOSING">
3488                     <context link="closing" field="org_unit" />
3489                 </create>
3490                 <retrieve/>
3491                 <update permission="EMERGENCY_CLOSING">
3492                     <context link="closing" field="org_unit" />
3493                 </update>
3494                 <delete permission="EMERGENCY_CLOSING">
3495                     <context link="closing" field="org_unit" />
3496                 </delete>
3497             </actions>
3498         </permacrud>
3499     </class>
3500         <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">
3501                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3502                         <field name="close_end" reporter:datatype="timestamp" />
3503                         <field name="close_start" reporter:datatype="timestamp" />
3504                         <field name="id" reporter:datatype="id" />
3505                         <field name="org_unit" reporter:datatype="org_unit"/>
3506                         <field name="reason" reporter:datatype="text"/>
3507                         <field name="full_day" reporter:datatype="bool"/>
3508                         <field name="multi_day" reporter:datatype="bool"/>
3509                         <field name="emergency_closing" reporter:datatype="link"/>
3510                 </fields>
3511                 <links>
3512                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3513                         <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3514                 </links>
3515         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3516             <actions>
3517                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3518                 <retrieve/>
3519                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3520                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3521             </actions>
3522         </permacrud>
3523         </class>
3524         <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">
3525                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3526                         <field name="extended" reporter:datatype="interval"/>
3527                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3528                         <field name="max_renewals" reporter:datatype="int" />
3529                         <field name="name" reporter:datatype="text"/>
3530                         <field name="normal" reporter:datatype="interval"/>
3531                         <field name="shrt" reporter:datatype="interval"/>
3532                         <field name="max_auto_renewals" reporter:datatype="int" />
3533                 </fields>
3534                 <links>
3535                 </links>
3536         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3537             <actions>
3538                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3539                 <retrieve/>
3540                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3541                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3542             </actions>
3543         </permacrud>
3544         </class>
3545
3546         <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">
3547                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3548                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3549                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3550             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3551                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3552             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3553                 </fields>
3554                 <links>
3555             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3556                 </links>
3557                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3558             <actions>
3559                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3560                 <retrieve/>
3561                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3562                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3563             </actions>
3564                 </permacrud>
3565         </class>
3566
3567         <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">
3568                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3569                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3570                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3571                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3572             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3573                 </fields>
3574                 <links>
3575                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3576                 </links>
3577                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3578             <actions>
3579                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3580                 <retrieve/>
3581                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3582                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3583             </actions>
3584                 </permacrud>
3585         </class>
3586
3587         <class id="mobts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
3588                 <fields oils_persist:primary="id" oils_persist:sequence="">
3589                         <field name="balance_owed" reporter:datatype="money"/>
3590                         <field name="id" reporter:datatype="id" />
3591                         <field name="last_billing_note" reporter:datatype="text"/>
3592                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3593                         <field name="last_billing_type" reporter:datatype="text"/>
3594                         <field name="last_payment_note" reporter:datatype="text"/>
3595                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3596                         <field name="last_payment_type" reporter:datatype="text"/>
3597                         <field name="total_owed" reporter:datatype="money"/>
3598                         <field name="total_paid" reporter:datatype="money"/>
3599                         <field name="usr" reporter:datatype="link"/>
3600                         <field name="xact_finish" reporter:datatype="timestamp" />
3601                         <field name="xact_start" reporter:datatype="timestamp" />
3602                         <field name="xact_type" reporter:datatype="text"/>
3603                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3604                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3605                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3606                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3607                         <field name="billing_location" reporter:datatype="link"/>
3608                 </fields>
3609                 <links>
3610                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3611                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3612                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3613                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3614                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3615                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3616                 </links>
3617                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3618                         <actions>
3619                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3620                                         <context link="usr" field="home_ou" />
3621                                 </retrieve>
3622                         </actions>
3623                 </permacrud>
3624         </class>
3625         <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">
3626                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3627                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3628                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3629                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3630                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3631                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3632                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3633                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3634                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3635                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3636                         <field reporter:label="Privacy Waiver Entries" name = "waiver_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3637                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3638                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3639                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3640                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3641                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3642                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3643                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3644                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3645                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3646                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3647                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3648                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3649                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3650                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3651                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3652                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3653                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3654                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3655                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3656                         <field reporter:label="User ID" name="id" reporter:datatype="id" reporter:selector="usrname" />
3657                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3658                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3659                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3660                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3661                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3662                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3663                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3664                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3665                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3666                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3667                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3668                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3669                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3670                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3671                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3672                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3673                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3674                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3675                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3676                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3677                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3678                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3679                         <field reporter:label="Preferred Prefix" name="pref_prefix" reporter:datatype="text"/>
3680                         <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
3681                         <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
3682                         <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
3683                         <field reporter:label="Preferred Suffix" name="pref_suffix" reporter:datatype="text"/>
3684                         <field reporter:label="Parent/Guardian" name="guardian" reporter:datatype="text"/>
3685                         <field reporter:label="Name Keywords" name="name_keywords" reporter:datatype="text"/>
3686                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3687                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3688                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3689                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3690                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3691                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3692                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3693                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3694                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3695                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3696                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3697                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3698                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3699                 </fields>
3700                 <links>
3701                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3702                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3703                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3704                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3705                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3706                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3707                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3708                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3709                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3710                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3711                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3712                         <link field="waiver_entries" reltype="has_many" key="usr" map="" class="aupw"/>
3713                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3714                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3715                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3716                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3717                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3718                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3719                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3720                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3721                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3722                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3723                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3724                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3725                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3726                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3727                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3728                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3729                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3730                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3731                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3732                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3733                 </links>
3734                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3735                         <actions>
3736                                 <retrieve permission="VIEW_USER user_request.view" context_field="home_ou" />
3737                         </actions>
3738                 </permacrud>
3739         </class>
3740         <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">
3741                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3742                         <field name="id" reporter:label="ID" reporter:datatype="id" reporter:selector="label"/>
3743                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3744                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3745                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3746                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3747                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3748                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3749                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3750         </fields>
3751                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3752                         <actions>
3753                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3754                                 <retrieve/>
3755                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3756                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3757                         </actions>
3758                 </permacrud>
3759         </class>
3760         <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">
3761                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3762                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3763                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3764                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3765                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3766         </fields>
3767         <links>
3768                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3769                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3770                 </links>
3771                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3772                         <actions>
3773                                 <retrieve permission="RUN_REPORTS">
3774                                         <context link="usr" field="home_ou" />
3775                                 </retrieve>
3776                         </actions>
3777                 </permacrud>
3778         </class>
3779         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3780                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3781                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3782                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3783                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3784                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3785                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3786                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3787         </fields>
3788         <links>
3789                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3790                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3791                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3792                 </links>
3793                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3794                         <actions>
3795                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3796                                         <context link="usr" field="home_ou" />
3797                                         <context link="ws" field="owning_lib" />
3798                                 </retrieve>
3799                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3800                                         <context link="usr" field="home_ou" />
3801                                         <context link="ws" field="owning_lib" />
3802                                 </create>
3803                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3804                                         <context link="usr" field="home_ou" />
3805                                         <context link="ws" field="owning_lib" />
3806                                 </update>
3807                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3808                                         <context link="usr" field="home_ou" />
3809                                         <context link="ws" field="owning_lib" />
3810                                 </delete>
3811                         </actions>
3812                 </permacrud>
3813         </class>
3814         <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">
3815                 <fields oils_persist:primary="name">
3816                         <field name="name" reporter:datatype="text"/>
3817                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3818                 </fields>
3819                 <links/>
3820                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3821                         <actions>
3822                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3823                                 <retrieve/>
3824                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3825                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3826                         </actions>
3827                 </permacrud>
3828         </class>
3829         <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">
3830                 <fields oils_persist:primary="name">
3831                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3832                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3833                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3834                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3835                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3836                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3837                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3838                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3839                 </fields>
3840                 <links>
3841                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3842                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3843                 </links>
3844                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3845                         <actions>
3846                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3847                                 <retrieve/>
3848                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3849                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3850                         </actions>
3851                 </permacrud>
3852         </class>
3853         <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">
3854                 <fields oils_persist:primary="name">
3855                         <field name="name" reporter:datatype="text"/>
3856                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3857                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3858                         <field name="datatype" reporter:datatype="text"/>
3859                         <field name="view_perm" reporter:datatype="link"/>
3860                         <field name="update_perm" reporter:datatype="link"/>
3861                         <field name="fm_class" reporter:datatype="text"/>
3862                         <field name="grp" reporter:datatype="link"/>
3863                 </fields>
3864                 <links>
3865                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3866                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3867                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3868                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3869                 </links>
3870                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3871                         <actions>
3872                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3873                                 <retrieve/>
3874                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3875                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3876                         </actions>
3877                 </permacrud>
3878         </class>
3879         <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">
3880                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3881                         <field name="id" />
3882                         <field name="name"  reporter:datatype="text"/>
3883                         <field name="org_unit" reporter:datatype="org_unit"/>
3884                         <field name="value"  reporter:datatype="text"/>
3885                 </fields>
3886                 <links>
3887                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3888                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3889                 </links>
3890         </class>
3891         <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">
3892                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3893                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3894                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3895                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3896                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3897                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3898                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3899                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3900                 </fields>
3901                 <links>
3902                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3903                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3904                 </links>
3905         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3906             <actions>
3907                 <create permission="CREATE_COPY_NOTE">
3908                     <context link="owning_copy" field="circ_lib"/>
3909                 </create>
3910                 <retrieve permission="VIEW_COPY_NOTES">
3911                     <context link="owning_copy" field="circ_lib"/>
3912                 </retrieve>
3913                 <update permission="UPDATE_COPY_NOTE">
3914                     <context link="owning_copy" field="circ_lib"/>
3915                 </update>
3916                 <delete permission="DELETE_COPY_NOTE">
3917                     <context link="owning_copy" field="circ_lib"/>
3918                 </delete>
3919             </actions>
3920         </permacrud>
3921         </class>
3922         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3923                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3924                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3925                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3926                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3927                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3928                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3929                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3930                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3931                 </fields>
3932                 <links>
3933                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3934                 </links>
3935         </class>
3936         <class id="mmr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3937                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3938                         <field name="fingerprint"  reporter:datatype="text"/>
3939                         <field name="id" reporter:datatype="id" reporter:selector="fingerprint" />
3940                         <field name="master_record" reporter:datatype="link"/>
3941                         <field name="mods"  reporter:datatype="text"/>
3942                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3943                         <field name="source_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3944                 </fields>
3945                 <links>
3946                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3947                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3948                         <link field="source_maps" reltype="has_many" key="metarecord" class="mmrsm"/>
3949                 </links>
3950                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3951                         <actions>
3952                                 <retrieve/>
3953                         </actions>
3954                 </permacrud>
3955         </class>
3956         <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">
3957                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3958                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3959                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3960                 </fields>
3961                 <links/>
3962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3963             <actions>
3964                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3965                 <retrieve/>
3966                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3967                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3968             </actions>
3969         </permacrud>
3970         </class>
3971         <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">
3972                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3973                         <field name="code"  reporter:datatype="text"/>
3974                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3975                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3976                 </fields>
3977                 <links/>
3978         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3979             <actions>
3980                 <create permission="CREATE_PERM" global_required="true"/>
3981                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3982                 <update permission="UPDATE_PERM" global_required="true"/>
3983                 <delete permission="DELETE_PERM" global_required="true"/>
3984             </actions>
3985         </permacrud>
3986         </class>
3987         <class id="mmrsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
3988                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3989                         <field name="id" reporter:datatype="id" />
3990                         <field name="metarecord" reporter:datatype="link"/>
3991                         <field name="source" reporter:datatype="link"/>
3992                 </fields>
3993                 <links>
3994                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3995                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3996                 </links>
3997                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3998                         <actions>
3999                                 <retrieve/>
4000                         </actions>
4001                 </permacrud>
4002         </class>
4003         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
4004                         oils_obj:fieldmapper="metabib::display_entry" 
4005                         oils_persist:tablename="metabib.display_entry" 
4006                         oils_persist:field_safe="true"
4007                         reporter:label="Display Field Entry" oils_persist:readonly="true">
4008                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
4009                         <field name="id" reporter:datatype="id" />
4010                         <field name="field" reporter:datatype="link"/>
4011                         <field name="source" reporter:datatype="link"/>
4012                         <field name="value"  reporter:datatype="text"/>
4013                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
4014                 </fields>
4015                 <links>
4016                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4017                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4018                 </links>
4019                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4020                         <actions>
4021                                 <retrieve/>
4022                         </actions>
4023                 </permacrud>
4024         </class>
4025         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
4026                 oils_persist:tablename="metabib.flat_display_entry"
4027                 oils_obj:fieldmapper="metabib::flat_display_entry" 
4028                 oils_persist:field_safe="true"
4029                 reporter:label="Flat Display Entry" 
4030                 oils_persist:readonly="true">
4031                 <fields>
4032                         <field name="source" reporter:datatype="id" />
4033                         <field name="name" reporter:datatype="text"/>
4034                         <field name="multi" reporter:datatype="bool"/>
4035                         <field name="label" reporter:datatype="text"/>
4036                         <field name="field" reporter:datatype="link"/>
4037                         <field name="value" reporter:datatype="text"/>
4038                 </fields>
4039                 <links>
4040                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4041                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4042                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4043                 </links>
4044                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4045                         <actions>
4046                                 <retrieve/>
4047                         </actions>
4048                 </permacrud>
4049         </class>
4050         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
4051                 oils_persist:tablename="metabib.compressed_display_entry"
4052                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
4053                 oils_persist:field_safe="true"
4054                 reporter:label="Compressed Display Entry" 
4055                 oils_persist:readonly="true">
4056                 <fields>
4057                         <field name="source" reporter:datatype="id" />
4058                         <field name="name" reporter:datatype="text"/>
4059                         <field name="multi" reporter:datatype="bool"/>
4060                         <field name="label" reporter:datatype="text"/>
4061                         <field name="field" reporter:datatype="link"/>
4062                         <field name="value" reporter:datatype="text"/>
4063                 </fields>
4064                 <links>
4065                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4066                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4067                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4068                 </links>
4069                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4070                         <actions>
4071                                 <retrieve/>
4072                         </actions>
4073                 </permacrud>
4074         </class>
4075         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
4076                 oils_persist:tablename="metabib.wide_display_entry"
4077                 oils_obj:fieldmapper="metabib::wide_display_entry" 
4078                 oils_persist:field_safe="true"
4079                 reporter:label="Wide Display Entry" 
4080                 oils_persist:readonly="true">
4081                 <fields oils_persist:primary="source">
4082                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
4083                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
4084                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
4085                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
4086                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
4087                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
4088                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
4089                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
4090                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
4091                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
4092                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
4093                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
4094                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
4095                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
4096                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
4097                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
4098                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
4099                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
4100                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
4101                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
4102                 </fields>
4103                 <links>
4104                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4105                 </links>
4106                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4107                         <actions>
4108                                 <retrieve/>
4109                         </actions>
4110                 </permacrud>
4111         </class>
4112
4113         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4114                 oils_persist:tablename="config.display_field_map"
4115                 oils_obj:fieldmapper="config::display_field_map"
4116                 oils_persist:field_safe="true"
4117                 reporter:label="Display Field Map">
4118                 <fields oils_persist:primary="name">
4119                         <field name="name" reporter:datatype="text"/>
4120                         <field name="field" reporter:datatype="link"/>
4121                         <field name="multi" reporter:datatype="bool"/>
4122                 </fields>
4123                 <links>
4124                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4125                 </links>
4126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4127                         <actions>
4128                                 <retrieve/>
4129                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4130                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4131                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4132                         </actions>
4133                 </permacrud>
4134         </class>
4135
4136         <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">
4137                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4138                         <field name="id" reporter:datatype="id" />
4139                         <field name="field" reporter:datatype="link"/>
4140                         <field name="source" reporter:datatype="link"/>
4141                         <field name="value"  reporter:datatype="text"/>
4142                 </fields>
4143                 <links>
4144                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4145                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4146                 </links>
4147         </class>
4148         <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">
4149                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4150                         <field name="id" reporter:datatype="id" />
4151                         <field name="value" reporter:datatype="text"/>
4152                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4153                 </fields>
4154                 <links>
4155                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4156                 </links>
4157                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4158                         <actions>
4159                                 <retrieve/>
4160                         </actions>
4161                 </permacrud>
4162         </class>
4163         <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">
4164                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4165                         <field name="id" reporter:datatype="id" />
4166                         <field name="entry" reporter:datatype="link"/>
4167                         <field name="def" reporter:datatype="link"/>
4168                         <field name="source" reporter:datatype="link"/>
4169                 </fields>
4170                 <links>
4171                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4172                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4173                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4174                 </links>
4175         </class>
4176         <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">
4177                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4178                         <field name="id" reporter:datatype="id" />
4179                         <field name="entry" reporter:datatype="link"/>
4180                         <field name="simple_heading" reporter:datatype="link"/>
4181                 </fields>
4182                 <links>
4183                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4184                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4185                 </links>
4186         </class>
4187         <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">
4188                 <oils_persist:source_definition><![CDATA[
4189                         SELECT * FROM metabib.author_field_entry
4190                                                 UNION ALL
4191                         SELECT * FROM metabib.keyword_field_entry
4192                                                 UNION ALL
4193                         SELECT * FROM metabib.identifier_field_entry
4194                                                 UNION ALL
4195                         SELECT * FROM metabib.title_field_entry
4196                                                 UNION ALL
4197                         SELECT * FROM metabib.subject_field_entry
4198                                                 UNION ALL
4199                         SELECT * FROM metabib.series_field_entry
4200                 ]]></oils_persist:source_definition>
4201                 <fields>
4202                         <field name="field" reporter:datatype="link"/>
4203                         <field name="id" reporter:datatype="id" />
4204                         <field name="source" reporter:datatype="link"/>
4205                         <field name="value"  reporter:datatype="text"/>
4206                 </fields>
4207                 <links>
4208                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4209                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4210                 </links>
4211         </class>
4212         <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">
4213                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4214                         <field name="field" reporter:datatype="link"/>
4215                         <field name="id" reporter:datatype="id" />
4216                         <field name="source" reporter:datatype="link"/>
4217                         <field name="value"  reporter:datatype="text"/>
4218                 </fields>
4219                 <links>
4220                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4221                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4222                 </links>
4223         </class>
4224         <class id="mcp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
4225                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4226                         <field name="accepting_usr" reporter:datatype="link"/>
4227                         <field name="amount" reporter:datatype="money" />
4228                         <field name="amount_collected" reporter:datatype="money" />
4229                         <field name="cash_drawer" reporter:datatype="link"/>
4230                         <field name="id" reporter:datatype="id" />
4231                         <field name="note"  reporter:datatype="text"/>
4232                         <field name="payment_ts" reporter:datatype="timestamp"/>
4233                         <field name="xact" reporter:datatype="link"/>
4234                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4235                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4236                 </fields>
4237                 <links>
4238                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4239                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4240                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4241                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4242                 </links>
4243         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4244             <actions>
4245                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4246                     <context link="xact" jump="usr" field="home_ou"/>
4247                 </retrieve>
4248                         </actions>
4249                 </permacrud>
4250         </class>
4251         <class id="mfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
4252                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4253                         <field name="accepting_usr" reporter:datatype="link"/>
4254                         <field name="amount" reporter:datatype="money" />
4255                         <field name="amount_collected" reporter:datatype="money" />
4256                         <field name="id" reporter:datatype="id" />
4257                         <field name="note"  reporter:datatype="text"/>
4258                         <field name="payment_ts" reporter:datatype="timestamp"/>
4259                         <field name="xact" reporter:datatype="link"/>
4260                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4261                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4262                 </fields>
4263                 <links>
4264                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4265                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4266                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4267                 </links>
4268         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4269             <actions>
4270                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4271                     <context link="xact" jump="usr" field="home_ou"/>
4272                 </retrieve>
4273                         </actions>
4274                 </permacrud>
4275         </class>
4276         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4277                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4278                         <field name="accepting_usr" reporter:datatype="link"/>
4279                         <field name="amount" reporter:datatype="money" />
4280                         <field name="amount_collected" reporter:datatype="money" />
4281                         <field name="id" reporter:datatype="id" />
4282                         <field name="note"  reporter:datatype="text"/>
4283                         <field name="payment_ts" reporter:datatype="timestamp"/>
4284                         <field name="xact" reporter:datatype="link"/>
4285                         <field name="billing" reporter:datatype="link"/>
4286                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4287                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4288                 </fields>
4289                 <links>
4290                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4291                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4292                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4293                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4294                 </links>
4295         </class>
4296         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4297                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4298                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4299                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4300                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4301                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4302                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4303                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4304                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4305                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4306                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4307                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4308                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4309                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4310                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4311                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4312                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4313                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4314                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4315                 </fields>
4316                 <links>
4317                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4318                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4319                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4320                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4321                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4322                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4323                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4324                 </links>
4325         </class>
4326
4327         <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">
4328                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4329                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4330                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4331                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4332                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4333                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4334                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4335                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4336                 </fields>
4337                 <links/>
4338         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4339             <actions>
4340                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4341                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
4342                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4343                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4344             </actions>
4345         </permacrud>
4346         </class>
4347         <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">
4348                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4349                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4350                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4351                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4352                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4353                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4354                 </fields>
4355                 <links>
4356                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4357                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4358                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4359         </links>
4360         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4361             <actions>
4362                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4363                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4364                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4365                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4366             </actions>
4367         </permacrud>
4368         </class>
4369         <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">
4370                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4371                         <field name="holdable" reporter:datatype="bool"/>
4372                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4373                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4374                         <field name="opac_visible" reporter:datatype="bool"/>
4375             <field name="copy_active" reporter:datatype="bool"/>
4376             <field name="restrict_copy_delete" reporter:datatype="bool"/>
4377             <field name="is_available" reporter:datatype="bool"/>
4378                 </fields>
4379                 <links/>
4380         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4381             <actions>
4382                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4383                 <retrieve/>
4384                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4385                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4386             </actions>
4387         </permacrud>
4388         </class>
4389         <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">
4390                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
4391                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4392                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4393                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4394                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4395                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4396                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4397                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4398                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
4399                 </fields>
4400                 <links>
4401                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4402                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4403                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4404                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4405                 </links>
4406                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4407                         <actions>
4408                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4409                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4410                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4411                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4412                         </actions>
4413                 </permacrud>
4414         </class>
4415         <class id="aua" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
4416                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4417                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4418                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4419                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4420                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4421                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4422                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4423                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4424                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4425                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4426                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4427                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4428                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4429                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4430                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4431                 </fields>
4432                 <links>
4433                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4434                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4435                 </links>
4436                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4437                         <actions>
4438                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4439                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4440                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4441                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4442                         </actions>
4443                 </permacrud>
4444         </class>
4445         <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">
4446                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4447                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4448                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4449                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4450                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4451                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4452                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4453                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4454                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4455                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4456                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4457                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4458                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4459                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4460                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4461                 </fields>
4462                 <links>
4463                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4464                 </links>
4465                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4466                         <actions>
4467                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4468                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4469                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4470                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4471                         </actions>
4472                 </permacrud>
4473         </class>
4474
4475
4476         <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">
4477                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4478                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4479                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4480                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4481                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4482                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4483                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4484                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4485                 </fields>
4486                 <links>
4487                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4488                 </links>
4489         </class>
4490
4491         <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">
4492                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4493                         <field name="call_number" />
4494                         <field name="create_date" reporter:datatype="timestamp"/>
4495                         <field name="creator" reporter:datatype="link"/>
4496                         <field name="id" reporter:datatype="id" />
4497                         <field name="pub" reporter:datatype="bool"/>
4498                         <field name="title"  reporter:datatype="text"/>
4499                         <field name="value"  reporter:datatype="text"/>
4500                 </fields>
4501                 <links>
4502                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4503                 </links>
4504         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4505             <actions>
4506                 <create permission="CREATE_VOLUME_NOTE">
4507                     <context link="call_number" field="owning_lib"/>
4508                 </create>
4509                 <retrieve permission="VIEW_VOLUME_NOTES">
4510                     <context link="call_number" field="owning_lib"/>
4511                 </retrieve>
4512                 <update permission="UPDATE_VOLUME_NOTE">
4513                     <context link="call_number" field="owning_lib"/>
4514                 </update>
4515                 <delete permission="DELETE_VOLUME_NOTE">
4516                     <context link="call_number" field="owning_lib"/>
4517                 </delete>
4518             </actions>
4519         </permacrud>
4520         </class>
4521         <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">
4522                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4523                         <field name="create_date" reporter:datatype="timestamp"/>
4524                         <field name="creator" reporter:datatype="link"/>
4525                         <field name="edit_date" reporter:datatype="timestamp"/>
4526                         <field name="editor" reporter:datatype="link"/>
4527                         <field name="id" reporter:datatype="id" />
4528                         <field name="record" reporter:datatype="link"/>
4529                         <field name="value" reporter:datatype="text"/>
4530                 </fields>
4531                 <links>
4532                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4533                 </links>
4534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4535             <actions>
4536                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4537                 <retrieve/>
4538                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4539                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4540             </actions>
4541         </permacrud>
4542         </class>
4543         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4544         <oils_persist:source_definition><![CDATA[
4545 SELECT  usr,
4546         SUM(
4547             CASE
4548                 WHEN (
4549                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4550                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4551                 ) THEN 1
4552                 ELSE 0
4553             END
4554         ) AS out,
4555
4556         SUM(
4557             CASE
4558                 WHEN (
4559                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4560                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4561                 ) THEN 1
4562                 ELSE 0
4563             END
4564         ) AS overdue,
4565
4566         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4567         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4568         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4569   FROM  action.circulation
4570   WHERE checkin_time IS NULL
4571   GROUP BY 1
4572         ]]></oils_persist:source_definition>
4573         <fields oils_persist:primary="usr">
4574             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4575             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4576             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4577             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4578             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4579             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4580         </fields>
4581         <links>
4582             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4583         </links>
4584         </class>
4585         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4586         <oils_persist:source_definition><![CDATA[
4587 SELECT  usr,
4588         STRING_AGG(
4589             CASE
4590                 WHEN (
4591                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4592                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4593                 ) THEN id::TEXT
4594                 ELSE '0'
4595             END
4596         ,',') AS out,
4597
4598         STRING_AGG(
4599             CASE
4600                 WHEN (
4601                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4602                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4603                 ) THEN id::TEXT
4604                 ELSE '0'
4605             END
4606         ,',') AS overdue,
4607
4608         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4609         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4610         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4611   FROM  action.circulation
4612   WHERE checkin_time IS NULL
4613   GROUP BY 1
4614         ]]></oils_persist:source_definition>
4615         <fields oils_persist:primary="usr">
4616             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4617             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4618             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4619             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4620             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4621             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4622         </fields>
4623         <links>
4624             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4625         </links>
4626         </class>
4627         <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">
4628                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4629                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4630                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4631                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4632                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4633                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4634                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4635                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4636                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4637                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4638                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4639                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4640                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4641                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4642                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4643                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4644                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4645                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4646                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4647                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4648                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4649                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4650                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4651                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4652                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4653                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4654                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4655                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4656                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4657                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4658                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4659                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4660                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4661                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4662                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4663                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4664                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4665                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4666                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4667                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4668                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4669                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4670                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4671                 </fields>
4672                 <links>
4673                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4674                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4675                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4676                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4677                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4678                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4679                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4680                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4681                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4682                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4683                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4684                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4685                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4686                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4687                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4688                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4689                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4690                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4691                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4692                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4693                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4694                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4695                 </links>
4696                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4697                         <actions>
4698                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4699                         </actions>
4700                 </permacrud>
4701         </class>
4702         <class id="aacct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation_combined_types" oils_persist:tablename="action.all_circulation_combined_types" reporter:core="true" reporter:label="All Circulation Combined Types" oils_persist:readonly="true">
4703                 <fields>
4704                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4705                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4706                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4707                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4708                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4709                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4710                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4711                 </fields>
4712                 <links>
4713                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4714                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4715                 </links>
4716                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4717                         <actions>
4718                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4719                         </actions>
4720                 </permacrud>
4721         </class>
4722         <class id="aacs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation_slim" oils_persist:tablename="action.all_circulation_slim" reporter:core="true" reporter:label="Combined Aged and Active circulations" oils_persist:readonly="true">
4723                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4724                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4725                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4726                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4727                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4728                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4729                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4730                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4731                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4732                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4733                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4734                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4735                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4736                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4737                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4738                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4739                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4740                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4741                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4742                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4743                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4744                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4745                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4746                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4747                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4748                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4749                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4750                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4751                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4752                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4753                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4754                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4755                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4756                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4757                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4758                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4759                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4760                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4761                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4762                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4763                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4764                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4765                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4766                 </fields>
4767                 <links>
4768                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4769                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4770                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4771                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4772                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4773                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4774                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
4775                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
4776                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4777                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4778                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4779                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4780                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4781                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4782                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4783                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4784                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4785                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4786                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4787                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4788                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4789                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4790                 </links>
4791                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4792                         <actions>
4793                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4794                         </actions>
4795                 </permacrud>
4796         </class>
4797
4798         <class id="combcirc" controller="open-ils.cstore open-ils.pcrud" 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">
4799                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4800                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4801                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4802                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4803                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4804                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4805                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4806                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4807                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4808                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4809                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4810                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4811                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4812                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4813                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4814                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4815                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4816                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4817                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4818                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4819                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4820                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4821                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4822                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4823                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4824                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4825                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4826                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4827                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4828                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4829                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4830                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4831                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4832                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4833                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4834                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4835                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4836                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4837                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4838                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4839                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4840                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4841                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4842                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4843                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4844                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4845                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4846                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4847                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4848                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4849                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4850                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4851                 </fields>
4852                 <links>
4853                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4854                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4855                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4856                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4857                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4858                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4859                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
4860                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
4861                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4862                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4863                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4864                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4865                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4866                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4867                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4868                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4869                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4870                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4871                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4872                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4873                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4874                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4875                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4876                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4877                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4878                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4879                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4880                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4881                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4882                 </links>
4883                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4884                         <actions>
4885                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4886                         </actions>
4887                 </permacrud>
4888         </class>
4889         <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">
4890                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4891                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4892                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4893                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4894                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4895                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4896                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4897                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4898                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4899                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4900                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4901                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4902                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4903                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4904                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4905                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4906                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4907                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4908                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4909                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4910                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4911                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4912                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4913                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4914                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4915                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4916                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4917                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4918                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4919                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4920                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4921                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4922                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4923                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4924                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4925                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4926                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4927                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4928                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4929                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4930                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4931                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4932                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4933                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4934                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4935                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4936                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4937                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4938                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4939                 </fields>
4940                 <links>
4941                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4942                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4943                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4944                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4945                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4946                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4947                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
4948                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
4949                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4950                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4951                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4952                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4953                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4954                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4955                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4956                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4957                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4958                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4959                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4960                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4961                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4962                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4963                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4964                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4965                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4966                 </links>
4967         </class>
4968         <class id="auch" 
4969                 controller="open-ils.cstore" 
4970                 oils_obj:fieldmapper="action::user_circ_history" 
4971                 oils_persist:tablename="action.usr_circ_history" 
4972                 reporter:label="User Checkout History">
4973                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4974                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4975                         <!-- prevent reporting on the user that owns the checkout history -->
4976                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4977                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4978                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4979                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4980                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4981                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4982                 </fields>
4983                 <links>
4984                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4985                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4986                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4987                 </links>
4988         </class>
4989         <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">
4990                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4991                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4992                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
4993                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4994                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4995                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4996                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4997                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4998                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4999                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
5000                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
5001                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5002                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5003                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5004                 </fields>
5005                 <links>
5006                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5007                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5008                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
5009                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
5010                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
5011                 </links>
5012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5013                         <actions>
5014                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5015                                 <retrieve/>
5016                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5017                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5018                         </actions>
5019                 </permacrud>
5020         </class>
5021
5022         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
5023                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
5024                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
5025                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5026                         <field reporter:label="Resource Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
5027                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
5028                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" oils_obj:required="true"/>
5029                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5030                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5031                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
5032                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5033                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5034                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5035                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
5036                 </fields>
5037                 <links>
5038                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5039                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
5040                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
5041                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
5042                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
5043                 </links>
5044                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5045                         <actions>
5046                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5047                                 <retrieve/>
5048                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5049                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5050                         </actions>
5051                 </permacrud>
5052         </class>
5053         
5054         <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">
5055                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
5056                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
5057                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5058                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5059                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
5060                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
5061                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
5062                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5063                 </fields>
5064                 <links>
5065                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5066                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
5067                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
5068                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
5069                 </links>
5070                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5071                         <actions>
5072                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5073                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5074                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5075                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5076                         </actions>
5077                 </permacrud>
5078         </class>
5079         
5080         <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">
5081                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
5082                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
5083                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5084                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link" oils_obj:required="true"/>
5085                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text" oils_obj:required="true"/>
5086                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5087                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5088                 </fields>
5089                 <links>
5090                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5091                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
5092                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
5093                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
5094                 </links>
5095                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5096                         <actions>
5097                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5098                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5099                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5100                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5101                         </actions>
5102                 </permacrud>
5103         </class>
5104         
5105         <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">
5106                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
5107                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
5108                         <field reporter:label="Resource" name="resource" reporter:datatype="link" oils_obj:required="true"/>
5109                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link" oils_obj:required="true"/>
5110                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link" oils_obj:required="true"/>
5111                 </fields>
5112                 <links>
5113                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
5114                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
5115                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
5116                 </links>
5117                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5118                         <actions>
5119                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5120                     <context link="resource" field="owner" />
5121                 </create>
5122                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5123                     <context link="resource" field="owner" />
5124                 </retrieve>
5125                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5126                     <context link="resource" field="owner" />
5127                 </update>
5128                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5129                     <context link="resource" field="owner" />
5130                 </delete>
5131                         </actions>
5132                 </permacrud>
5133         </class>
5134         
5135         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5136                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5137                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5138                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5139                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5140                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5141                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5142                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5143                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5144                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5145                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5146                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5147                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5148                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5149                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5150                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5151                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5152                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5153                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5154                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5155                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5156                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5157                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5158                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5159                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5160                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5161                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5162                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5163                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5164                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5165                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5166                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5167                 </fields>
5168                 <links>
5169                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5170                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5171                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5172                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5173                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5174                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5175                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5176                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5177                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5178                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5179                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5180                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5181                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5182                 </links>
5183                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5184                         <actions>
5185                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5186                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5187                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5188                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5189                         </actions>
5190                 </permacrud>
5191         </class>
5192         
5193         <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">
5194                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5195                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5196                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5197                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5198                 </fields>
5199                 <links>
5200                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5201                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5202                 </links>
5203                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5204                         <actions>
5205                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5206                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5207                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5208                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5209                         </actions>
5210                 </permacrud>
5211         </class>
5212
5213         <class id="ccnbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
5214                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5215                         <field name="bucket" reporter:datatype="link"/>
5216                         <field name="id" reporter:datatype="id" />
5217                         <field name="target_call_number" reporter:datatype="link" />
5218                         <field name="create_time" reporter:datatype="timestamp" />
5219                         <field name="pos" reporter:datatype="int" />
5220                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5221                 </fields>
5222                 <links>
5223                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5224                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5225             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5226                 </links>
5227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5228                         <actions>
5229                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5230                     <context link="bucket" owning_lib="owning_lib"/>
5231                 </retrieve>
5232             </actions>
5233         </permacrud>
5234         </class>
5235         <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">
5236                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5237                         <field name="id" reporter:datatype="id" />
5238                         <field name="item" reporter:datatype="link"/>
5239                         <field name="note" reporter:datatype="text" />
5240                 </fields>
5241                 <links>
5242                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5243                 </links>
5244         </class>
5245         <class id="cbreb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
5246                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5247                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5248                         <field name="btype" reporter:datatype="text"/>
5249                         <field name="id" reporter:datatype="id" />
5250                         <field name="name" reporter:datatype="text"/>
5251                         <field name="description" reporter:datatype="text"/>
5252                         <field name="owner" reporter:datatype="link"/>
5253                         <field name="pub" reporter:datatype="bool"/>
5254                         <field name="create_time" reporter:datatype="timestamp" />
5255                         <field name="owning_lib" reporter:datatype="org_unit" />
5256                 </fields>
5257                 <links>
5258                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5259                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5260                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5261                 </links>
5262                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5263                         <actions>
5264                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5265                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5266                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5267                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5268                         </actions>
5269                 </permacrud>
5270         </class>
5271         <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">
5272                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5273                         <field name="id" reporter:datatype="id" />
5274                         <field name="bucket" reporter:datatype="link"/>
5275                         <field name="note" reporter:datatype="text" />
5276                 </fields>
5277                 <links>
5278                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5279                 </links>
5280         </class>
5281         <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">
5282                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5283                         <field name="hold" reporter:datatype="link"/>
5284                         <field name="id" reporter:datatype="id" />
5285                         <field name="target_copy" reporter:datatype="link"/>
5286                         <field name="proximity" reporter:datatype="number"/>
5287                 </fields>
5288                 <links>
5289                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5290                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5291                 </links>
5292         </class>
5293         <class id="ahn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
5294                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5295                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5296                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5297                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5298                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5299                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5300                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5301                 </fields>
5302                 <links>
5303                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5304                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5305                 </links>
5306         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5307             <actions>
5308                 <create permission="CREATE_HOLD_NOTIFICATION">
5309                                         <context link="hold" jump="usr" field="home_ou" />
5310                                 </create>
5311                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5312                                         <context link="hold" jump="usr" field="home_ou" />
5313                                 </retrieve>
5314                 <update permission="CREATE_HOLD_NOTIFICATION">
5315                                         <context link="hold" jump="usr" field="home_ou" />
5316                                 </update>
5317                 <delete permission="CREATE_HOLD_NOTIFICATION">
5318                                         <context link="hold" jump="usr" field="home_ou" />
5319                                 </delete>
5320             </actions>
5321         </permacrud>
5322         </class>
5323         <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">
5324                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5325                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5326                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5327                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5328                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5329                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5330                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5331                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5332                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5333                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5334                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5335                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5336                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5337                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5338                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5339                 </fields>
5340                 <links>
5341                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5342                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5343                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5344                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5345                 </links>
5346         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5347             <actions>
5348                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5349                 <retrieve/>
5350                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5351                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5352             </actions>
5353         </permacrud>
5354         </class>
5355         <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">
5356                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5357                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5358                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5359                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5360                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
5361             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5362             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5363             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5364                 </fields>
5365                 <links>
5366                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5367                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5368                 </links>
5369         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5370             <actions>
5371                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5372                 <retrieve/>
5373                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5374                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5375             </actions>
5376         </permacrud>
5377         </class>
5378         <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">
5379                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5380                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5381             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5382             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5383                 </fields>
5384                 <links>
5385                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5386                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5387                 </links>
5388         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5389             <actions>
5390                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5391                                         <context link="lgroup" field="owner" />
5392                 </create>
5393                 <retrieve/>
5394                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5395                                         <context link="lgroup" field="owner" />
5396                 </update>
5397                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5398                                         <context link="lgroup" field="owner" />
5399                 </delete>
5400             </actions>
5401         </permacrud>
5402         </class>
5403
5404     <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">
5405         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5406             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5407             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5408             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5409             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5410         </fields>
5411         <links>
5412             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5413             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5414         </links>
5415         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5416             <actions>
5417                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5418                 <retrieve/>
5419                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5420                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5421             </actions>
5422         </permacrud>
5423     </class>
5424
5425         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5426                 <fields>
5427                         <field name="sre_id" oils_persist:virtual="true" />
5428                         <field name="location" oils_persist:virtual="true" />
5429                         <field name="owning_lib" oils_persist:virtual="true" />
5430                         <field name="basic_holdings" oils_persist:virtual="true" />
5431                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5432                         <field name="supplement_holdings" oils_persist:virtual="true" />
5433                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5434                         <field name="index_holdings" oils_persist:virtual="true" />
5435                         <field name="index_holdings_add" oils_persist:virtual="true" />
5436                         <field name="online" oils_persist:virtual="true" />
5437                         <field name="missing" oils_persist:virtual="true" />
5438                         <field name="incomplete" oils_persist:virtual="true" />
5439                 </fields>
5440         </class>
5441
5442         <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">
5443                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5444                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5445                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5446                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5447                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5448                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5449                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5450                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5451                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5452                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5453                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5454                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5455                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5456                 </fields>
5457                 <links>
5458                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5459                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5460                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5461                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5462                 </links>
5463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5464                         <actions>
5465                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5466                                 <retrieve/>
5467                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5468                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5469                         </actions>
5470                 </permacrud>
5471         </class>
5472
5473         <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">
5474                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5475                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5476                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5477                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5478                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5479                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5480                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5481                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5482                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5483                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5484                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5485                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5486                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5487                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5488                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5489                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5490                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5491                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5492                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5493                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5494                 </fields>
5495                 <links>
5496                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5497                 </links>
5498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5499                         <actions>
5500                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5501                                         <context link="subscription" field="owning_lib" />
5502                                 </create>
5503                                 <retrieve />
5504                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5505                                         <context link="subscription" field="owning_lib" />
5506                                 </update>
5507                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5508                                         <context link="subscription" field="owning_lib" />
5509                                 </delete>
5510                         </actions>
5511                 </permacrud>
5512         </class>
5513
5514         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5515                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5516                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5517                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5518                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5519                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5520                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5521                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5522                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5523                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5524                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5525                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5526                 </fields>
5527                 <links>
5528                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5529                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5530                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5531                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5532                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5533                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5534                 </links>
5535                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5536                         <actions>
5537                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5538                                 <retrieve />
5539                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5540                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5541                         </actions>
5542                 </permacrud>
5543         </class>
5544
5545         <class id="ssubn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
5546                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5547                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5548                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5549                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5550                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5551                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5552                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5553                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5554                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5555                 </fields>
5556                 <links>
5557                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5558                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5559                 </links>
5560                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5561                         <actions>
5562                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5563                     <context link="subscription" field="owning_lib"/>
5564                 </create>
5565                                 <retrieve />
5566                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5567                     <context link="subscription" field="owning_lib"/>
5568                 </update>
5569                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5570                     <context link="subscription" field="owning_lib"/>
5571                 </delete>
5572                         </actions>
5573                 </permacrud>
5574         </class>
5575
5576         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5577                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5578                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5579                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5580                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5581                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5582                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5583                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5584                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5585                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5586                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5587                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5588                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5589                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5590                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5591                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5592                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5593                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5594                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5595                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5596                 </fields>
5597                 <links>
5598                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5599                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5600                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5601                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5602                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5603                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5604                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5605                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5606                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5607                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5608                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5609                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5610                 </links>
5611                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5612                         <actions>
5613                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5614                                 <retrieve />
5615                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5616                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5617                         </actions>
5618                 </permacrud>
5619         </class>
5620
5621         <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">
5622                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5623                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5624                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5625                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5626                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5627                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5628                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5629                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5630                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5631                 </fields>
5632                 <links>
5633                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5634                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5635                 </links>
5636                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5637                         <actions>
5638                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5639                                         <context link="distribution" field="holding_lib" />
5640                                 </create>
5641                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5642                                         <context link="distribution" field="holding_lib" />
5643                                 </retrieve>
5644                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5645                                         <context link="distribution" field="holding_lib" />
5646                                 </update>
5647                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5648                                         <context link="distribution" field="holding_lib" />
5649                                 </delete>
5650                         </actions>
5651                 </permacrud>
5652         </class>
5653
5654         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5655                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5656                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5657                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5658                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5659                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5660                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5661                 </fields>
5662                 <links>
5663                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5664                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5665                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5666                 </links>
5667                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5668                         <actions>
5669                                 <create permission="ADMIN_SERIAL_STREAM">
5670                                         <context link="distribution" field="holding_lib" />
5671                                 </create>
5672                                 <retrieve />
5673                                 <update permission="ADMIN_SERIAL_STREAM">
5674                                         <context link="distribution" field="holding_lib" />
5675                                 </update>
5676                                 <delete permission="ADMIN_SERIAL_STREAM">
5677                                         <context link="distribution" field="holding_lib" />
5678                                 </delete>
5679                         </actions>
5680                 </permacrud>
5681         </class>
5682
5683         <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">
5684                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5685                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5686                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5687                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5688                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5689                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5690                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5691                 </fields>
5692                 <links>
5693                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5694                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5695                 </links>
5696                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5697                         <actions>
5698                                 <create permission="ADMIN_SERIAL_STREAM">
5699                                         <context link="stream" jump="distribution" field="holding_lib" />
5700                                 </create>
5701                                 <retrieve permission="RECEIVE_SERIAL">
5702                                         <context link="stream" jump="distribution" field="holding_lib" />
5703                                 </retrieve>
5704                                 <update permission="ADMIN_SERIAL_STREAM">
5705                                         <context link="stream" jump="distribution" field="holding_lib" />
5706                                 </update>
5707                                 <delete permission="ADMIN_SERIAL_STREAM">
5708                                         <context link="stream" jump="distribution" field="holding_lib" />
5709                                 </delete>
5710                         </actions>
5711                 </permacrud>
5712         </class>
5713
5714         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5715                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5716                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5717                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5718                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5719                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5720                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5721                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5722                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5723                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5724                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5725                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5726                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5727                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5728                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5729                 </fields>
5730                 <links>
5731                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5732                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5733                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5734                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5735                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5736                 </links>
5737                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5738                         <actions>
5739                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5740                                         <context link="subscription" field="owning_lib" />
5741                                 </create>
5742                                 <retrieve/>
5743                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5744                                         <context link="subscription" field="owning_lib" />
5745                                 </update>
5746                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5747                                         <context link="subscription" field="owning_lib" />
5748                                 </delete>
5749                         </actions>
5750                 </permacrud>
5751         </class>
5752
5753         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5754                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5755                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5756                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5757                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5758                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5759                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5760                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5761                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5762                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5763                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5764                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5765                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5766                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5767                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5768                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5769                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5770                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5771                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5772                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5773                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5774                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5775                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5776                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5777                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5778                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5779                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5780                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5781                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5782                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5783                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5784                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5785                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5786                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5787                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5788                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5789                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5790                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5791                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5792                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5793                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5794                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5795                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5796                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5797                 </fields>
5798                 <links>
5799                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5800                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5801                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5802                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5803                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5804                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5805                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5806                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5807                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5808                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5809                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5810                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5811                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5812                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5813                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5814                 </links>
5815                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5816                         <actions>
5817                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5818                                 <retrieve/>
5819                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5820                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5821                         </actions>
5822                 </permacrud>
5823         </class>
5824
5825         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5826                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5827                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5828                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5829                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5830                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5831                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5832                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5833                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5834                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5835                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5836                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5837                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5838                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5839                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5840                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5841                 </fields>
5842                 <links>
5843                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5844                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5845                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5846                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5847                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5848                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5849                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5850                 </links>
5851                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5852                         <actions>
5853                                 <create permission="ADMIN_SERIAL_ITEM">
5854                                         <context link="stream" jump="distribution" field="holding_lib" />
5855                                 </create>
5856                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5857                                         <context link="stream" jump="distribution" field="holding_lib" />
5858                                 </retrieve>
5859                                 <update permission="ADMIN_SERIAL_ITEM">
5860                                         <context link="stream" jump="distribution" field="holding_lib" />
5861                                 </update>
5862                                 <delete permission="ADMIN_SERIAL_ITEM">
5863                                         <context link="stream" jump="distribution" field="holding_lib" />
5864                                 </delete>
5865                         </actions>
5866                 </permacrud>
5867         </class>
5868
5869         <class id="sin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5870                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5871                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5872                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5873                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5874                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5875                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5876                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5877                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5878                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5879                 </fields>
5880                 <links>
5881                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5882                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5883                 </links>
5884                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5885                         <actions>
5886                                 <create permission="ADMIN_SERIAL_ITEM">
5887                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5888                                 </create>
5889                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5890                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5891                                 </retrieve>
5892                                 <update permission="ADMIN_SERIAL_ITEM">
5893                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5894                                 </update>
5895                                 <delete permission="ADMIN_SERIAL_ITEM">
5896                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5897                                 </delete>
5898                         </actions>
5899                 </permacrud>
5900         </class>
5901         <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">
5902                 <fields>
5903                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5904                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5905                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5906                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5907                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5908                 </fields>
5909                 <links>
5910                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5911                 </links>
5912         </class>
5913         <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">
5914                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5915                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5916                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5917                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5918                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5919                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5920                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5921                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5922                 </fields>
5923                 <links>
5924                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5925                 </links>
5926         </class>
5927         <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">
5928                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5929                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5930                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5931                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5932                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5933                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5934                 </fields>
5935                 <links>
5936                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5937                 </links>
5938                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5939                         <actions>
5940                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5941                                         <context link="distribution" field="holding_lib" />
5942                                 </create>
5943                                 <retrieve/>
5944                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5945                                         <context link="distribution" field="holding_lib" />
5946                                 </update>
5947                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5948                                         <context link="distribution" field="holding_lib" />
5949                                 </delete>
5950                         </actions>
5951                 </permacrud>
5952         </class>
5953
5954         <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">
5955                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5956                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5957                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5958                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5959                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5960                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5961                 </fields>
5962                 <links>
5963                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5964                 </links>
5965                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5966                         <actions>
5967                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5968                                         <context link="distribution" field="holding_lib" />
5969                                 </create>
5970                                 <retrieve/>
5971                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5972                                         <context link="distribution" field="holding_lib" />
5973                                 </update>
5974                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5975                                         <context link="distribution" field="holding_lib" />
5976                                 </delete>
5977                         </actions>
5978                 </permacrud>
5979         </class>
5980
5981         <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">
5982                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5983                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5984                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5985                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5986                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5987                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5988                 </fields>
5989                 <links>
5990                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5991                 </links>
5992                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5993                         <actions>
5994                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5995                                         <context link="distribution" field="holding_lib" />
5996                                 </create>
5997                                 <retrieve/>
5998                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5999                                         <context link="distribution" field="holding_lib" />
6000                                 </update>
6001                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6002                                         <context link="distribution" field="holding_lib" />
6003                                 </delete>
6004                         </actions>
6005                 </permacrud>
6006         </class>
6007
6008         <class id="spt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::pattern_template" oils_persist:tablename="serial.pattern_template" reporter:label="Prediction Pattern Template">
6009                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
6010                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6011                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
6012                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
6013                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
6014                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
6015                 </fields>
6016                 <links>
6017                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6018                 </links>
6019                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6020                         <actions>
6021                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6022                                 <retrieve/>
6023                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6024                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6025                         </actions>
6026                 </permacrud>
6027         </class>
6028
6029         <class id="ascecm" controller="open-ils.cstore open-ils.pcrud" 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">
6030                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
6031                         <field name="id" reporter:datatype="id" />
6032                         <field name="owning_copy" reporter:datatype="link"/>
6033                         <field name="stat_cat" reporter:datatype="link"/>
6034                         <field name="stat_cat_entry" reporter:datatype="link"/>
6035                 </fields>
6036                 <links>
6037                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
6038                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
6039                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6040                 </links>
6041                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6042                         <actions>
6043                                 <retrieve/>
6044                         </actions>
6045                 </permacrud>
6046         </class>
6047         <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">
6048                 <fields oils_persist:primary="code">
6049                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
6050                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6051                 </fields>
6052                 <links/>
6053         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6054             <actions>
6055                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
6056                 <retrieve/>
6057                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
6058                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
6059             </actions>
6060         </permacrud>
6061         </class>
6062         <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">
6063                 <fields oils_persist:primary="code">
6064                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
6065                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6066                 </fields>
6067                 <links/>
6068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6069             <actions>
6070                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6071                 <retrieve/>
6072                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6073                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6074             </actions>
6075         </permacrud>
6076         </class>
6077         <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">
6078                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
6079                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
6080                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
6081                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
6082                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
6083                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
6084                 </fields>
6085                 <links>
6086             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6087         </links>
6088         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6089             <actions>
6090                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6091                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6092                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6093                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6094             </actions>
6095         </permacrud>
6096         </class>
6097         <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">
6098                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
6099                         <field name="id" reporter:datatype="id" />
6100                         <field name="name" reporter:datatype="text"/>
6101                 </fields>
6102                 <links/>
6103         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6104             <actions>
6105                 <create permission="CREATE_LASSO" global_required="true"/>
6106                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
6107                 <update permission="UPDATE_LASSO" global_required="true"/>
6108                 <delete permission="DELETE_LASSO" global_required="true"/>
6109             </actions>
6110         </permacrud>
6111         </class>
6112         <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">
6113                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
6114                         <field name="id" reporter:datatype="id" />
6115                         <field name="lasso" reporter:datatype="link"/>
6116                         <field name="org_unit" reporter:datatype="org_unit"/>
6117                 </fields>
6118                 <links>
6119                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6120                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6121                 </links>
6122         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6123             <actions>
6124                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
6125                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
6126                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
6127                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
6128             </actions>
6129         </permacrud>
6130         </class>
6131         <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">
6132                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6133                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6134                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6135                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6136                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6137                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6138                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6139                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6140                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
6141                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6142                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6143                 </fields>
6144                 <links>
6145                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6146                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6147                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6148                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6149                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6150                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6151                 </links>
6152         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6153             <actions>
6154                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6155                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6156                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6157                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6158             </actions>
6159         </permacrud>
6160         </class>
6161         <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">
6162                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6163                         <field name="id" reporter:datatype="id" />
6164                         <field name="from_org" reporter:datatype="org_unit"/>
6165                         <field name="to_org" reporter:datatype="org_unit"/>
6166                         <field name="prox" reporter:datatype="int" />
6167                 </fields>
6168                 <links>
6169                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6170                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6171                 </links>
6172         </class>
6173         <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">
6174                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6175                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6176                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6177                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6178                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6179                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6180                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6181                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6182                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6183                 </fields>
6184                 <links/>
6185         </class>
6186         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6187                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6188                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6189                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6190                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6191                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6192                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6193                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6194                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6195                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6196                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6197                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6198                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6199                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6200                 </fields>
6201                 <links>
6202                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6203                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6204                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6205                 </links>
6206         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6207             <actions>
6208                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6209                 <retrieve/>
6210                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6211                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6212             </actions>
6213         </permacrud>
6214         </class>
6215         <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">
6216                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6217                         <field name="address_type" reporter:label="Address Type" reporter:datatype="text" oils_obj:required="true" />
6218                         <field name="city" reporter:label="City" reporter:datatype="text" oils_obj:required="true"/>
6219                         <field name="country" reporter:label="Country" reporter:datatype="text" oils_obj:required="true"/>
6220                         <field name="county" reporter:label="County" reporter:datatype="text"/>
6221                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6222                         <field name="org_unit" reporter:label="Org Unit" reporter:datatype="org_unit" oils_obj:required="true"/>
6223                         <field name="post_code" reporter:label="Post Code" reporter:datatype="text" oils_obj:required="true"/>
6224                         <field name="state" reporter:label="State" reporter:datatype="text"/>
6225                         <field name="street1" reporter:label="Street1" reporter:datatype="text" oils_obj:required="true"/>
6226                         <field name="street2" reporter:label="Street2" reporter:datatype="text"/>
6227                         <field name="valid" reporter:label="Is Valid?" reporter:datatype="bool" oils_obj:required="true"/>
6228                         <field name="san" reporter:label="SAN" reporter:datatype="text"/>
6229                 </fields>
6230                 <links>
6231                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6232                 </links>
6233         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6234             <actions>
6235                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6236                 <retrieve/>
6237                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6238                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6239             </actions>
6240         </permacrud>
6241         </class>
6242         <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">
6243                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6244                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6245                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6246                         <field name="query_text" reporter:datatype="text"/>
6247                 </fields>
6248         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6249             <actions>
6250                 <retrieve/>
6251             </actions>
6252         </permacrud>
6253         </class>
6254
6255         <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">
6256                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6257                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6258                         <field name="owner" reporter:datatype="org_unit"/>
6259                         <field name="code" reporter:datatype="text"/>
6260                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6261                         <field name="create_date" reporter:datatype="timestamp"/>
6262                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6263                 </fields>
6264                 <links>
6265                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6266                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6267                 </links>
6268         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6269             <actions>
6270                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6271                 <retrieve/>
6272                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6273                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6274             </actions>
6275         </permacrud>
6276         </class>
6277         <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">
6278                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6279                         <field name="id" reporter:datatype="id"/>
6280                         <field name="grp" reporter:datatype="link"/>
6281                         <field name="pos" reporter:datatype="int"/>
6282                         <field name="query" reporter:datatype="link"/>
6283                 </fields>
6284                 <links>
6285                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6286                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6287                 </links>
6288         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6289             <actions>
6290                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6291                     <context link="grp" field="owner"/>
6292                 </create>
6293                 <retrieve/>
6294                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6295                     <context link="grp" field="owner"/>
6296                 </update>
6297                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6298                     <context link="grp" field="owner"/>
6299                 </delete>
6300             </actions>
6301         </permacrud>
6302         </class>
6303
6304         <!-- A note: Please update alhr and ahopl when updating ahr -->
6305         <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">
6306                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6307                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6308                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6309                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6310                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6311                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6312                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6313                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6314                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6315                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6316                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6317                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6318                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6319                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6320                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6321                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6322                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6323                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6324                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6325                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6326                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6327                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6328                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6329                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6330                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6331                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6332                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6333                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6334                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6335                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6336                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6337                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6338                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6339                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6340                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6341                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6342                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6343                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6344                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6345                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6346                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6347                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6348                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6349                 </fields>
6350                 <links>
6351                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6352                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6353                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6354                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6355                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6356                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6357                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6358                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6359                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6360                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6361                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6362                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6363                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6364                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6365                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6366                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6367                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6368                         <link field="hold_type" reltype="has_a" key="hold_type" map="" class="cht"/>
6369                 </links>
6370                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6371                         <actions>
6372                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6373                         </actions>
6374                 </permacrud>
6375         </class>
6376         <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">
6377                 <oils_persist:source_definition><![CDATA[
6378                 SELECT
6379                         ahr.*,
6380                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6381                                 copy_location_order_position,
6382                         CASE WHEN au.alias IS NOT NULL THEN
6383                                 au.alias
6384                         ELSE
6385                                 au.first_given_name
6386                         END AS usr_alias_or_first_given_name,
6387                         au.first_given_name AS usr_first_given_name,
6388                         au.second_given_name AS usr_second_given_name,
6389                         au.family_name AS usr_family_name,
6390                         au.prefix AS usr_prefix,
6391                         au.suffix AS usr_suffix,
6392                         au.alias AS usr_alias,
6393                         CASE WHEN au.alias IS NOT NULL THEN
6394                                 au.alias
6395                         ELSE
6396                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6397                                         COALESCE(au.family_name, ''),
6398                                         COALESCE(au.suffix, ''),
6399                                         ', ',
6400                                         COALESCE(au.prefix, ''),
6401                                         COALESCE(au.first_given_name, ''),
6402                                         COALESCE(au.second_given_name, '')
6403                                 ], ' '), E'\\s+,', ',')
6404                         END AS usr_alias_or_display_name,
6405                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6406                                 COALESCE(au.family_name, ''),
6407                                 COALESCE(au.suffix, ''),
6408                                 ', ',
6409                                 COALESCE(au.prefix, ''),
6410                                 COALESCE(au.first_given_name, ''),
6411                                 COALESCE(au.second_given_name, '')
6412                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6413                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6414                                 AS call_number_label,
6415                         siss.label AS issuance_label,
6416                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6417                         ahcm_1.copy_count AS potential_copies
6418                 FROM action.hold_request ahr
6419                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6420                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6421                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6422                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6423                 JOIN actor.usr au ON (au.id = ahr.usr)
6424                 JOIN (
6425                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6426                         FROM asset.copy_location
6427                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6428                 LEFT JOIN actor.usr_standing_penalty ausp 
6429                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6430                 LEFT JOIN config.standing_penalty csp
6431                         ON (
6432                                 csp.id = ausp.standing_penalty AND 
6433                                 csp.block_list LIKE '%CAPTURE%' AND (
6434                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6435                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6436                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6437                                         )
6438                                 )
6439                         )
6440                 JOIN (
6441                         SELECT COUNT(target_copy) AS copy_count, hold
6442                         FROM action.hold_copy_map
6443                         GROUP BY 2
6444                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6445                 LEFT JOIN serial.issuance siss
6446                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6447                 LEFT JOIN asset.copy_location_order acplo
6448                         ON (acp.location = acplo.location AND
6449                                 acp.circ_lib = acplo.org)
6450                 WHERE
6451                         ahr.capture_time IS NULL AND
6452                         ahr.cancel_time IS NULL AND
6453                         csp.id IS NULL AND
6454                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6455                         acp.status IN (0,7)
6456                 ]]></oils_persist:source_definition>
6457                 <fields oils_persist:primary="id">
6458                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6459                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6460                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6461                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6462                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6463                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6464                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6465                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6466                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6467                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6468                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6469                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6470                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6471                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6472                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6473                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6474                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6475                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6476                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6477                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6478                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6479                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6480                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6481                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6482                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6483                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6484                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6485                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6486                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6487                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6488                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6489                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6490                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6491                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6492                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6493                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6494                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6495                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6496                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6497                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6498                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6499                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6500                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6501                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6502                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6503                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6504                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6505                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6506                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6507                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6508                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6509                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6510                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6511                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6512                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6513                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6514                 </fields>
6515                 <links>
6516                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6517                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6518                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6519                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6520                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6521                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6522                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6523                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6524                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6525                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6526                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6527                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6528                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6529                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6530                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6531                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6532                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6533                 </links>
6534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6535                         <actions>
6536                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6537                         </actions>
6538                 </permacrud>
6539         </class>
6540         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6541                 <oils_persist:source_definition><![CDATA[
6542                         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 AND current_copy IS NOT NULL AND fulfillment_time IS NULL GROUP BY current_copy)x USING (current_copy, capture_time)
6543                 ]]></oils_persist:source_definition>
6544                 <fields oils_persist:primary="id">
6545                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6546                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6547                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6548                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6549                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6550                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6551                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6552                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6553                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6554                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6555                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6556                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6557                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6558                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6559                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6560                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6561                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6562                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6563                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6564                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6565                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6566                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6567                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6568                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6569                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6570                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6571                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6572                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6573                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6574                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6575                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6576                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6577                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6578                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6579                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6580                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6581                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6582                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6583                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6584                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6585                 </fields>
6586                 <links>
6587                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6588                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6589                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6590                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6591                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6592                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6593                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6594                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6595                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6596                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6597                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6598                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6599                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6600                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6601                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6602                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6603                 </links>
6604         </class>
6605
6606         <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">
6607                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6608                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6609                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6610                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6611                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6612                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6613                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6614                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6615                 </fields>
6616                 <links>
6617                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6618                 </links>
6619                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6620                         <actions>
6621                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6622                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6623                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6624                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6625                         </actions>
6626                 </permacrud>
6627         </class>
6628         <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">
6629                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6630                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6631                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6632                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6633                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6634                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6635                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6636                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6637                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6638                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6639                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6640                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6641                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6642                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6643                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6644                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6645                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6646                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6647                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6648                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6649                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6650                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6651                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6652                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6653                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6654                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6655                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6656                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6657                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6658                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6659                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6660                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6661                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6662                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6663                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6664                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6665                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6666                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6667                 </fields>
6668                 <links>
6669                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6670                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6671                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6672                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6673                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6674                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6675                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6676                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6677                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6678                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6679                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6680                 </links>
6681                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6682                         <actions>
6683                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6684                         </actions>
6685                 </permacrud>
6686         </class>
6687         <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">
6688                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6689                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6690                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6691                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6692                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6693                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6694                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6695                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6696                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6697                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6698                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6699                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6700                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6701                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6702                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6703                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6704                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6705                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6706                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6707                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6708                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6709                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6710                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6711                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6712                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6713                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6714                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6715                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6716                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6717                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6718                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6719                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6720                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6721                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6722                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6723                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6724                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6725                 </fields>
6726                 <links>
6727                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6728                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6729                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6730                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6731                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6732                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6733                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6734                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6735                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6736                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6737                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6738                 </links>
6739                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6740                         <actions>
6741                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6742                         </actions>
6743                 </permacrud>
6744         </class>
6745
6746         <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">
6747                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6748                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6749                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6750                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6751                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6752                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6753                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6754                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
6755                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link" oils_obj:required="true"/>
6756                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6757                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6758                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6759                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6760                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6761                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link" oils_obj:required="true"/>
6762                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6763                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6764                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6765                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6766                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6767                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6768                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6769                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6770                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6771                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6772                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6773                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6774                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6775                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6776                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6777                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6778                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6779                 </fields>
6780                 <links>
6781                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6782                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6783                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6784                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6785                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6786                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6787                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6788                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6789                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6790                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6791                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6792                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6793                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6794                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6795                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6796                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6797                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6798                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6799                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6800                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6801                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6802                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6803                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6804                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6805                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6806                 </links>
6807         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6808             <actions>
6809                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6810                 <retrieve />
6811                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6812                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6813             </actions>
6814         </permacrud>
6815         </class>
6816         <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">
6817                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6818                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6819                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6820                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6821                 </fields>
6822                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6823                         <actions>
6824                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6825                                 <retrieve/>
6826                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6827                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6828                         </actions>
6829                 </permacrud>
6830         </class>
6831         <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">
6832                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6833                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6834                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6835                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6836                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6837                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6838                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6839                 </fields>
6840                 <links>
6841                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6842                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6843                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6844                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6845                 </links>
6846                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6847                         <actions>
6848                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6849                                 <retrieve/>
6850                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6851                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6852                         </actions>
6853                 </permacrud>
6854         </class>
6855         <class id="ccnb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">
6856                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6857                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6858                         <field name="btype" reporter:datatype="text"/>
6859                         <field name="id" reporter:datatype="id" />
6860                         <field name="name"  reporter:datatype="text"/>
6861                         <field name="description" reporter:datatype="text"/>
6862                         <field name="owner" reporter:datatype="link"/>
6863                         <field name="pub" reporter:datatype="bool"/>
6864                         <field name="create_time" reporter:datatype="timestamp" />
6865                         <field name="owning_lib" reporter:datatype="org_unit" />
6866                 </fields>
6867                 <links>
6868                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6869                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6870                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6871                 </links>
6872                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6873                         <actions>
6874                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6875                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6876                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6877                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6878                         </actions>
6879                 </permacrud>
6880         </class>
6881         <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">
6882                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6883                         <field name="id" reporter:datatype="id" />
6884                         <field name="bucket" reporter:datatype="link"/>
6885                         <field name="note" reporter:datatype="text" />
6886                 </fields>
6887                 <links>
6888                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6889                 </links>
6890         </class>
6891         <class id="asc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
6892                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6893                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6894                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6895                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6896                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6897                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6898                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6899                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6900                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6901                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6902                 </fields>
6903                 <links>
6904                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6905                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6906                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6907                 </links>
6908                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6909                         <actions>
6910                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6911                         </actions>
6912                 </permacrud>
6913         </class>
6914         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6915                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6916                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6917                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6918                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6919                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6920                 </fields>
6921                 <links>
6922                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6923                 </links>
6924                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6925                         <actions>
6926                                 <retrieve permission="VIEW_USER user_request.view">
6927                                         <context link="usr" field="home_ou" />
6928                                 </retrieve>
6929                         </actions>
6930                 </permacrud>
6931         </class>
6932     <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">
6933         <fields oils_persist:primary="field">
6934             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6935             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6936             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6937         </fields>
6938         <links/>
6939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6940             <actions>
6941                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6942                 <retrieve />
6943                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6944                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6945             </actions>
6946         </permacrud>
6947     </class>
6948         <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">
6949                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6950                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6951                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6952                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6953                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6954                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6955                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6956                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6957                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6958                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6959                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6960                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6961                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6962                 </fields>
6963                 <links>
6964                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6965                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6966                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6967                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6968                 </links>
6969         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6970             <actions>
6971                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6972                 <retrieve />
6973                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6974                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6975             </actions>
6976         </permacrud>
6977         </class>
6978         <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">
6979                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6980                         <field name="field" reporter:datatype="link"/>
6981                         <field name="id" reporter:datatype="id" />
6982                         <field name="source" reporter:datatype="link"/>
6983                         <field name="value"  reporter:datatype="text"/>
6984                 </fields>
6985                 <links>
6986                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6987                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6988                 </links>
6989         </class>
6990         <class id="cub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6991                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6992                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6993                         <field name="btype" reporter:datatype="text"/>
6994                         <field name="id" reporter:datatype="id" />
6995                         <field name="name"  reporter:datatype="text"/>
6996                         <field name="description" reporter:datatype="text"/>
6997                         <field name="owner" reporter:datatype="link"/>
6998                         <field name="pub" reporter:datatype="bool"/>
6999                         <field name="create_time" reporter:datatype="timestamp" />
7000                         <field name="owning_lib" reporter:datatype="org_unit" />
7001                 </fields>
7002                 <links>
7003                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7004                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7005                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
7006                 </links>
7007                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7008                         <actions>
7009                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7010                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7011                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7012                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7013                         </actions>
7014                 </permacrud>
7015         </class>
7016         <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">
7017                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
7018                         <field name="id" reporter:datatype="id" />
7019                         <field name="bucket" reporter:datatype="link"/>
7020                         <field name="note" reporter:datatype="text" />
7021                 </fields>
7022                 <links>
7023                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7024                 </links>
7025         </class>
7026         <class id="mcrp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
7027                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7028                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7029                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7030                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7031                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
7032                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
7033                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7034                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7035                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
7036                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7037                 </fields>
7038                 <links>
7039                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7040                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7041                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7042                 </links>
7043         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7044             <actions>
7045                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7046                     <context link="xact" jump="usr" field="home_ou"/>
7047                 </retrieve>
7048                         </actions>
7049                 </permacrud>
7050         </class>
7051         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
7052                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
7053                         <field name="id" reporter:datatype="id" />
7054                         <field name="ind1" />
7055                         <field name="ind2" />
7056                         <field name="record" />
7057                         <field name="subfield" />
7058                         <field name="tag" />
7059                         <field name="value" />
7060                 </fields>
7061                 <links>
7062                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
7063                 </links>
7064         </class>
7065         <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">
7066                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
7067                         <field name="id" reporter:label="ID" reporter:datatype="id" />
7068                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
7069                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
7070                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
7071                 </fields>
7072                 <links>
7073                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
7074                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
7075                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
7076                 </links>
7077         </class>
7078         <class id="cnct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
7079                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
7080                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
7081                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7082                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
7083                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7084                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
7085                 </fields>
7086                 <links>
7087                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7088                 </links>
7089         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7090             <actions>
7091                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7092                 <retrieve/>
7093                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7094                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7095             </actions>
7096         </permacrud>
7097
7098         </class>
7099         <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">
7100                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
7101                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7102                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
7103                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
7104                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
7105                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7106                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7107                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
7108                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
7109                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
7110                 </fields>
7111                 <links>
7112                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
7113                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
7114                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
7115                 </links>
7116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7117             <actions>
7118                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
7119                 <retrieve/>
7120                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
7121                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
7122             </actions>
7123         </permacrud>
7124         </class>
7125         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
7126                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7127                         <field name="create_date" reporter:datatype="timestamp"/>
7128                         <field name="creator" reporter:datatype="link"/>
7129                         <field name="edit_date" reporter:datatype="timestamp"/>
7130                         <field name="editor" reporter:datatype="link"/>
7131                         <field name="id" reporter:datatype="id" />
7132                         <field name="pub" reporter:datatype="bool"/>
7133                         <field name="record" reporter:datatype="link"/>
7134                         <field name="value"  reporter:datatype="text"/>
7135                 </fields>
7136                 <links>
7137                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7138                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7139                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7140                 </links>
7141         </class>
7142         <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">
7143                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7144                         <field name="balance_owed" reporter:datatype="money" />
7145                         <field name="total_owed" reporter:datatype="money" />
7146                         <field name="total_paid" reporter:datatype="money" />
7147                         <field name="usr" reporter:datatype="link"/>
7148                 </fields>
7149                 <links>
7150                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7151                 </links>
7152         </class>
7153     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7154                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7155                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7156                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7157                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7158                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7159                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7160                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7161                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7162                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7163                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7164                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7165                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7166                 </fields>
7167                 <links>
7168                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7169                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7170                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7171                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7172                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7173                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7174                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7175                 </links>
7176         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7177             <actions>
7178                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7179             </actions>
7180         </permacrud>
7181         </class>
7182         <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">
7183                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7184                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7185                         <field name="quality" reporter:datatype="int" />
7186                         <field name="source" reporter:datatype="text"/>
7187                         <field name="transcendant" reporter:datatype="bool"/>
7188                         <field name="can_have_copies" reporter:datatype="bool"/>
7189                 </fields>
7190                 <links/>
7191         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7192             <actions>
7193                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7194                 <retrieve/>
7195                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7196                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7197             </actions>
7198         </permacrud>
7199         </class>
7200         <class id="mbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
7201                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7202                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7203                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7204                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7205                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7206                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7207                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7208                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7209                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7210                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7211                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7212                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7213                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7214                 </fields>
7215                 <links>
7216                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7217                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7218                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7219                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7220                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7221                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7222                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7223                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7224                 </links>
7225                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7226                         <actions>
7227                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7228                                         <context link="usr" field="home_ou" />
7229                                 </retrieve>
7230                         </actions>
7231                 </permacrud>
7232         </class>
7233         <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">
7234                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7235                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7236                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7237                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7238                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7239                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7240                 </fields>
7241                 <links>
7242                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7243                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7244                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7245                 </links>
7246         </class>
7247         <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">
7248                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7249                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7250                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7251                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7252                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7253                 </fields>
7254                 <links>
7255                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7256                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7257                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7258                 </links>
7259         </class>
7260         <class id="cubi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item" reporter:label="User Bucket Item">
7261                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7262                         <field name="bucket" reporter:datatype="link"/>
7263                         <field name="id" reporter:datatype="id" />
7264                         <field name="target_user" reporter:datatype="link"/>
7265                         <field name="create_time" reporter:datatype="timestamp" />
7266                         <field name="pos" reporter:datatype="int" />
7267                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7268                 </fields>
7269                 <links>
7270                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7271                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7272             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7273                 </links>
7274                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7275                         <actions>
7276                                 <retrieve permission="ADMIN_USER_BUCKET">
7277                     <context link="bucket" owning_lib="owning_lib"/>
7278                 </retrieve>
7279             </actions>
7280         </permacrud>
7281         </class>
7282         <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">
7283                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7284                         <field name="id" reporter:datatype="id" />
7285                         <field name="item" reporter:datatype="link"/>
7286                         <field name="note" reporter:datatype="text" />
7287                 </fields>
7288                 <links>
7289                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7290                 </links>
7291         </class>
7292         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7293                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7294                         <field name="balance_owed" reporter:datatype="money" />
7295                         <field name="total_owed" reporter:datatype="money" />
7296                         <field name="total_paid" reporter:datatype="money" />
7297                         <field name="usr" reporter:datatype="link"/>
7298                 </fields>
7299                 <links>
7300                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7301                 </links>
7302         </class>
7303         <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">
7304                 <fields oils_persist:primary="code" oils_persist:sequence="">
7305                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7306                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7307                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7308                 </fields>
7309                 <links/>
7310         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7311             <actions>
7312                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7313                 <retrieve/>
7314                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7315                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7316             </actions>
7317         </permacrud>
7318         </class>
7319         <class id="mwp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
7320                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7321                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7322                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7323                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7324                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7325                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7326                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7327                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7328                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7329                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7330                 </fields>
7331                 <links>
7332                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7333                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7334                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7335                 </links>
7336         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7337             <actions>
7338                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7339                     <context link="xact" jump="usr" field="home_ou"/>
7340                 </retrieve>
7341                         </actions>
7342                 </permacrud>
7343         </class>
7344         <class id="mgp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
7345                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7346                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7347                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7348                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7349                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7350                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7351                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7352                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7353                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7354                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7355                 </fields>
7356                 <links>
7357                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7358                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7359                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7360                 </links>
7361         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7362             <actions>
7363                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7364                     <context link="xact" jump="usr" field="home_ou"/>
7365                 </retrieve>
7366                         </actions>
7367                 </permacrud>
7368         </class>
7369         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7370                 <fields oils_persist:primary="id" oils_persist:sequence="">
7371                         <field name="checkin_lib" reporter:datatype="link"/>
7372                         <field name="checkin_staff" reporter:datatype="link"/>
7373                         <field name="checkin_time" reporter:datatype="timestamp"/>
7374                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7375                         <field name="circ_staff" reporter:datatype="link"/>
7376                         <field name="desk_renewal" reporter:datatype="bool"/>
7377                         <field name="due_date" reporter:datatype="timestamp"/>
7378                         <field name="duration" reporter:datatype="interval"/>
7379                         <field name="duration_rule" reporter:datatype="link"/>
7380                         <field name="fine_interval" reporter:datatype="interval"/>
7381                         <field name="id" reporter:datatype="id" />
7382                         <field name="max_fine" reporter:datatype="money" />
7383                         <field name="max_fine_rule" reporter:datatype="link"/>
7384                         <field name="opac_renewal" reporter:datatype="bool"/>
7385                         <field name="phone_renewal" reporter:datatype="bool"/>
7386                         <field name="recurring_fine" reporter:datatype="money" />
7387                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7388                         <field name="renewal_remaining" reporter:datatype="int" />
7389             <field name="grace_period" reporter:datatype="interval" />
7390                         <field name="stop_fines" reporter:datatype="text"/>
7391                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7392                         <field name="target_copy" reporter:datatype="link"/>
7393                         <field name="usr" reporter:datatype="link"/>
7394                         <field name="xact_finish" reporter:datatype="timestamp" />
7395                         <field name="xact_start" reporter:datatype="timestamp" />
7396                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7397                         <field name="auto_renewal" reporter:datatype="bool"/>
7398                         <field name="auto_renewal_remaining" reporter:datatype="int" />
7399                 </fields>
7400                 <links>
7401                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7402                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7403                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7404                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7405                 </links>
7406         </class>
7407         <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">
7408                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7409                         <field name="field" reporter:datatype="link"/>
7410                         <field name="id" reporter:datatype="id" />
7411                         <field name="source" reporter:datatype="link"/>
7412                         <field name="value" reporter:datatype="text"/>
7413                 </fields>
7414                 <links>
7415                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7416                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7417                 </links>
7418         </class>
7419         <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">
7420                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7421                         <field name="high" reporter:datatype="money" />
7422                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7423                         <field name="low" reporter:datatype="money" />
7424                         <field name="name" reporter:datatype="text"/>
7425                         <field name="normal" reporter:datatype="money" />
7426                         <field name="recurrence_interval" reporter:datatype="interval"/>
7427             <field name="grace_period" reporter:datatype="interval" />
7428                 </fields>
7429                 <links/>
7430         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7431             <actions>
7432                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7433                 <retrieve/>
7434                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7435                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7436             </actions>
7437         </permacrud>
7438         </class>
7439         <class id="mckp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
7440                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7441                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7442                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7443                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7444                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7445                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7446                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7447                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7448                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7449                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7450                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7451                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7452                 </fields>
7453                 <links>
7454                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7455                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7456                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7457                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7458                 </links>
7459         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7460             <actions>
7461                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7462                     <context link="xact" jump="usr" field="home_ou"/>
7463                 </retrieve>
7464                         </actions>
7465                 </permacrud>
7466         </class>
7467         <class id="mdcp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::debit_card_payment" oils_persist:tablename="money.debit_card_payment" reporter:label="Debit Card Payment">
7468                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7469                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7470                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7471                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7472                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7473                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7474                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7475                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7476                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7477                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7478                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7479                 </fields>
7480                 <links>
7481                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7482                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7483                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7484                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7485                 </links>
7486         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7487             <actions>
7488                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7489                     <context link="xact" jump="usr" field="home_ou"/>
7490                 </retrieve>
7491                         </actions>
7492                 </permacrud>
7493         </class>
7494         <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">
7495                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7496                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7497                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7498                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7499                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7500                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7501                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7502                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7503                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7504                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7505                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7506                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7507                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7508                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7509                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7510                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7511                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7512                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7513                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7514                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7515                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7516                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7517                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7518                         <field reporter:label="Copy ID" name="id" reporter:selector="barcode" reporter:datatype="id"/>
7519                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7520                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7521                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7522                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7523                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7524                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7525                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7526                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7527                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7528                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7529                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7530                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7531                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7532                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7533                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7534                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7535                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7536                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7537                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7538                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7539                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7540                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7541                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7542                         <field reporter:label="Latest Inventory" name="latest_inventory" oils_persist:virtual="true" reporter:datatype="link"/>
7543                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7544                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7545                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7546                 </fields>
7547                 <links>
7548                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7549                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7550                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7551                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7552                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7553                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7554                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7555                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7556                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7557                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7558                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7559                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7560                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7561                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7562                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7563                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7564                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7565                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7566                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7567                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7568                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7569                         <link field="latest_inventory" reltype="might_have" key="copy" map="" class="alci"/>
7570                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7571                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7572                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7573                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7574                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7575                 </links>
7576         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7577             <actions>
7578                 <create permission="CREATE_COPY">
7579                     <context link="call_number" field="owning_lib"/>
7580                 </create>
7581                 <retrieve/>
7582                 <update permission="UPDATE_COPY">
7583                     <context link="call_number" field="owning_lib"/>
7584                 </update>
7585                 <delete permission="DELETE_COPY">
7586                     <context link="call_number" field="owning_lib"/>
7587                 </delete>
7588             </actions>
7589         </permacrud>
7590         </class>
7591
7592         <class id="alci" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::latest_inventory" oils_persist:tablename="asset.latest_inventory" reporter:core="true" reporter:label="Latest Inventory">
7593                 <fields oils_persist:primary="id" oils_persist:sequence="asset.latest_inventory_id_seq">
7594             <field reporter:label="Latest Inventory ID" name="id" reporter:datatype="id"/>
7595                         <field reporter:label="Latest Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
7596                         <field reporter:label="Latest Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
7597                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
7598                 </fields>
7599                 <links>
7600                         <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
7601                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7602                 </links>
7603         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7604             <actions>
7605                                 <create/>
7606                                 <retrieve/>
7607                                 <update/>
7608                                 <delete/>
7609             </actions>
7610         </permacrud>
7611         </class>
7612
7613         <class id="ccat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_alert_type" oils_persist:tablename="config.copy_alert_type" reporter:label="Copy Alert Type" oils_persist:restrict_primary="100">
7614                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7615                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7616                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7617                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7618                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7619                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7620                         <field reporter:label="Event" name="event" reporter:datatype="text" />
7621                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
7622                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
7623                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
7624                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
7625                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
7626                 </fields>
7627                 <links>
7628                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
7629                 </links>
7630         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7631             <actions>
7632                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7633                 <retrieve/>
7634                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7635                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
7636             </actions>
7637         </permacrud>
7638         </class>
7639
7640         <class id="acas" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::copy_alert_suppress" oils_persist:tablename="actor.copy_alert_suppress" reporter:label="Copy Alert Suppression">
7641                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
7642                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7643                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
7644                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7645                 </fields>
7646                 <links>
7647                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7648                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7649                 </links>
7650         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7651             <actions>
7652                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7653                 <retrieve/>
7654                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7655                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
7656             </actions>
7657         </permacrud>
7658         </class>
7659
7660         <class id="aca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_alert" oils_persist:tablename="asset.copy_alert" reporter:label="Copy Alert">
7661                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
7662                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7663                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7664                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7665                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7666                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7667                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7668                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7669                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7670                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7671                 </fields>
7672                 <links>
7673                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7674                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7675                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7676                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7677                 </links>
7678         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7679             <actions>
7680                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
7681                     <context link="copy" field="circ_lib"/>
7682                 </create>
7683                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
7684                     <context link="copy" field="circ_lib"/>
7685                                 </retrieve>
7686                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
7687                     <context link="copy" field="circ_lib"/>
7688                                 </update>
7689                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
7690                     <context link="copy" field="circ_lib"/>
7691                                 </delete>
7692             </actions>
7693         </permacrud>
7694         </class>
7695
7696         <class id="aaca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::active_copy_alert" oils_persist:tablename="asset.active_copy_alert" reporter:label="Active Copy Alert" oils_persist:readonly="true">
7697                 <fields oils_persist:primary="id">
7698                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7699                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7700                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7701                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7702                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7703                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7704                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7705                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7706                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7707                 </fields>
7708                 <links>
7709                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7710                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7711                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7712                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7713                 </links>
7714         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7715             <actions>
7716                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
7717                     <context link="copy" field="circ_lib"/>
7718                 </create>
7719                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
7720                     <context link="copy" field="circ_lib"/>
7721                                 </retrieve>
7722                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
7723                     <context link="copy" field="circ_lib"/>
7724                                 </update>
7725                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
7726                     <context link="copy" field="circ_lib"/>
7727                                 </delete>
7728             </actions>
7729         </permacrud>
7730         </class>
7731
7732         <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">
7733                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7734                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7735                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7736                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7737                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7738                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7739                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7740                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7741                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7742                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7743                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7744                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7745                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7746                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7747                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7748                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7749                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7750                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7751                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7752                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7753                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7754                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7755                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7756                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7757                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7758                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7759                 </fields>
7760                 <links>
7761                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7762                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7763                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7764                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7765                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7766                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7767                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7768                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7769                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7770                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7771                 </links>
7772                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7773                         <actions>
7774                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7775                                 <retrieve />
7776                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7777                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7778                         </actions>
7779                 </permacrud>
7780         </class>
7781
7782         <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">
7783                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7784                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7785                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7786                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7787                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7788                 </fields>
7789                 <links/>
7790         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7791             <actions>
7792                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7793                 <retrieve/>
7794                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7795                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7796             </actions>
7797         </permacrud>
7798         </class>
7799         <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">
7800                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7801                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7802                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7803                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7804                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7805                 </fields>
7806                 <links/>
7807         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7808             <actions>
7809                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7810                 <retrieve/>
7811                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7812                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7813             </actions>
7814         </permacrud>
7815         </class>
7816         <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">
7817                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7818                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7819                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7820                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7821                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7822                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7823                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7824                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7825                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7826                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7827                 </fields>
7828                 <links>
7829                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7830                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7831                 </links>
7832         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7833             <actions>
7834                 <create permission="CREATE_PERM" global_required="true"/>
7835                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7836                 <update permission="UPDATE_PERM" global_required="true"/>
7837                 <delete permission="DELETE_PERM" global_required="true"/>
7838             </actions>
7839         </permacrud>
7840         </class>
7841         <class id="pgtde" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_tree_display_entry" oils_persist:tablename="permission.grp_tree_display_entry" reporter:label="Permission Group Tree Display Entry">
7842                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_display_entry_id_seq">
7843                         <field reporter:label="Entry ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7844                         <field reporter:label="Group ID" name="grp" reporter:datatype="link" oils_persist:i18n="true"/>
7845                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7846                         <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
7847                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7848                         <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7849                 </fields>
7850                 <links>
7851                         <link field="parent" reltype="has_a" key="id" map="" class="pgtde"/>
7852                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7853                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7854                         <link field="children" reltype="has_many" key="parent" map="" class="pgtde"/>
7855                 </links>
7856                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7857                         <actions>
7858                                 <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7859                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7860                                 <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7861                                 <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7862                         </actions>
7863                 </permacrud>
7864         </class>
7865         <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">
7866                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7867                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7868                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7869                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7870                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7871                 </fields>
7872                 <links>
7873                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7874                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7875                 </links>
7876         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7877             <actions>
7878                 <create permission="ADMIN_SURVEY">
7879                     <context link="question" jump="survey" field="owner"/>
7880                 </create>
7881                 <retrieve/>
7882                 <update permission="ADMIN_SURVEY">
7883                     <context link="question" jump="survey" field="owner"/>
7884                 </update>
7885                 <delete permission="ADMIN_SURVEY">
7886                     <context link="question" jump="survey" field="owner"/>
7887                 </delete>
7888             </actions>
7889         </permacrud>
7890         </class>
7891         <class id="ancc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
7892                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7893                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7894                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7895                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7896                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7897                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7898                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7899                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7900                 </fields>
7901                 <links>
7902                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7903                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7904                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7905                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7906                 </links>
7907                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7908                         <actions>
7909                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7910                         </actions>
7911                 </permacrud>
7912         </class>
7913         <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">
7914                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7915                         <field name="balance_owed" reporter:datatype="money" />
7916                         <field name="total_owed" reporter:datatype="money" />
7917                         <field name="total_paid" reporter:datatype="money" />
7918                         <field name="usr" reporter:datatype="link"/>
7919                 </fields>
7920                 <links>
7921                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7922                 </links>
7923         </class>
7924         <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">
7925                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7926                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7927                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7928                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7929                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7930                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7931                 </fields>
7932                 <links>
7933                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7934                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7935                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7936                 </links>
7937         </class>
7938         <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">
7939                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7940                         <field name="field" reporter:datatype="link"/>
7941                         <field name="id" reporter:datatype="id" />
7942                         <field name="source" reporter:datatype="link"/>
7943                         <field name="value" reporter:datatype="text"/>
7944                 </fields>
7945                 <links>
7946                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7947                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7948                 </links>
7949         </class>
7950         <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">
7951                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7952                         <field name="field" reporter:datatype="link"/>
7953                         <field name="id" reporter:datatype="id" />
7954                         <field name="source" reporter:datatype="link"/>
7955                         <field name="value" reporter:datatype="text"/>
7956                 </fields>
7957                 <links>
7958                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7959                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7960                 </links>
7961         </class>
7962         <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">
7963                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7964                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7965                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7966                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7967                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7968                 </fields>
7969                 <links>
7970                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7971                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7972                 </links>
7973         </class>
7974         <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">
7975                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7976                         <field name="depth" reporter:datatype="int" />
7977                         <field name="grantable" reporter:datatype="bool"/>
7978                         <field name="grp" reporter:datatype="link"/>
7979                         <field name="id" reporter:datatype="id" />
7980                         <field name="perm" reporter:datatype="link"/>
7981                 </fields>
7982                 <links>
7983                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7984                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7985                 </links>
7986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7987             <actions>
7988                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7989                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7990                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7991                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7992             </actions>
7993         </permacrud>
7994         </class>
7995         <class id="ccb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
7996                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7997                         <field name="items" oils_persist:virtual="true" />
7998                         <field name="btype" reporter:datatype="text"/>
7999                         <field name="id" reporter:datatype="id" />
8000                         <field name="name" reporter:datatype="text"/>
8001                         <field name="description" reporter:datatype="text"/>
8002                         <field name="owner" reporter:datatype="link"/>
8003                         <field name="pub" reporter:datatype="bool"/>
8004                         <field name="create_time" reporter:datatype="timestamp" />
8005                         <field name="owning_lib" reporter:datatype="org_unit" />
8006                 </fields>
8007                 <links>
8008                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8009                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8010                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
8011                 </links>
8012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8013                         <actions>
8014                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8015                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8016                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8017                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8018                         </actions>
8019                 </permacrud>
8020         </class>
8021         <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">
8022                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
8023                         <field name="id" reporter:datatype="id" />
8024                         <field name="bucket" reporter:datatype="link"/>
8025                         <field name="note" reporter:datatype="text" />
8026                 </fields>
8027                 <links>
8028                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
8029                 </links>
8030         </class>
8031         <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">
8032                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
8033                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
8034                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
8035                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
8036                 </fields>
8037                 <links>
8038                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8039                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
8040                 </links>
8041         </class>
8042         <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">
8043                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
8044                         <field name="depth" reporter:datatype="int"/>
8045                         <field name="grantable" reporter:datatype="bool"/>
8046                         <field name="id" reporter:datatype="id" />
8047                         <field name="perm" reporter:datatype="link"/>
8048                         <field name="usr" reporter:datatype="link"/>
8049                 </fields>
8050                 <links>
8051                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8052                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8053                 </links>
8054         </class>
8055         <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">
8056                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
8057                         <field name="object_id" reporter:datatype="text"/>
8058                         <field name="grantable" reporter:datatype="bool"/>
8059                         <field name="id" reporter:datatype="id" />
8060                         <field name="perm" reporter:datatype="link"/>
8061                         <field name="usr" reporter:datatype="link"/>
8062                         <field name="object_type" reporter:datatype="text"/>
8063                 </fields>
8064                 <links>
8065                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8066                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8067                 </links>
8068         </class>
8069         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:label="Payments">
8070                 <fields oils_persist:primary="id" oils_persist:sequence="">
8071                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8072                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8073                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8074                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8075                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8076                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8077                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8078                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8079                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8080                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8081                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8082                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8083                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8084                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8085                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8086                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8087                 </fields>
8088                 <links>
8089                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8090                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8091                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8092                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8093                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8094                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8095                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8096                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8097                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8098                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8099                 </links>
8100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8101             <actions>
8102                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8103                     <context link="xact" jump="usr" field="home_ou"/>
8104                 </retrieve>
8105                         </actions>
8106                 </permacrud>
8107         </class>
8108         <class id="map" controller="open-ils.cstore open-ils.pcrud" 
8109                 oils_obj:fieldmapper="money::aged_payment" 
8110                 oils_persist:tablename="money.aged_payment" 
8111                 reporter:label="Payments: Aged">
8112                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8113                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8114                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8115                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8116                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8117                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8118                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8119                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8120                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8121                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8122                         <field name="billing" reporter:datatype="link"/>
8123                 </fields>
8124                 <links>
8125                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8126                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8127                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8128                         <link field="billing" reltype="has_a" key="id" class="mab"/>
8129                 </links>
8130                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8131                         <actions>
8132                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8133                                         <context link="xact" field="usr_home_ou"/>
8134                                 </retrieve>
8135                         </actions>
8136                 </permacrud>
8137         </class>
8138         <class id="mallp" controller="open-ils.cstore" 
8139                 oils_obj:fieldmapper="money::all_payments" 
8140                 oils_persist:tablename="money.all_payments" 
8141                 oils_persist="readonly" reporter:core="true"
8142                 reporter:label="Payments: All">
8143                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8144                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8145                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8146                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8147                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8148                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8149                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8150                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8151                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8152                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8153                         <field name="billing" reporter:datatype="link"/>
8154                 </fields>
8155                 <links>
8156                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8157                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8158                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8159                         <link field="billing" reltype="has_a" key="id" class="mallb"/>
8160                 </links>
8161         </class>
8162
8163         <class id="mbp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
8164                 <fields oils_persist:primary="id" oils_persist:sequence="">
8165                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8166                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8167                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8168                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8169                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8170                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8171                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8172                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8173                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8174                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8175                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8176                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8177                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8178                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8179                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8180                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8181                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8182                 </fields>
8183                 <links>
8184                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8185                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8186                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8187                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8188                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8189                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8190                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8191                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8192                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8193                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8194                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8195                 </links>
8196                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8197                         <actions>
8198                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8199                                         <context link="xact" jump="usr" field="home_ou"/>
8200                                 </retrieve>
8201                         </actions>
8202                 </permacrud>
8203         </class>
8204         <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">
8205                 <fields oils_persist:primary="id" oils_persist:sequence="">
8206                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8207                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8208                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8209                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8210                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8211                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8212                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8213                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8214                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8215                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8216                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8217                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8218                 </fields>
8219                 <links>
8220                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8221                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8222                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8223                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8224                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8225                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8226                 </links>
8227         </class>
8228         <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">
8229                 <fields oils_persist:primary="id" oils_persist:sequence="">
8230                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8231                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8232                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8233                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8234                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8235                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8236                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8237                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8238                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8239                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8240                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8241                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8242                         <field reporter:label="Debit Card Payment" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8243                 </fields>
8244                 <links>
8245                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8246                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8247                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8248                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8249                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8250                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8251                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8252                 </links>
8253         </class>
8254         <class id="cbrebi" controller="open-ils.cstore open-ils.pcrud" 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">
8255                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
8256                         <field name="bucket" reporter:datatype="link"/>
8257                         <field name="id" reporter:datatype="id" />
8258                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
8259                         <field name="create_time" reporter:datatype="timestamp" />
8260                         <field name="pos" reporter:datatype="int" />
8261                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8262                 </fields>
8263                 <links>
8264                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
8265                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
8266             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
8267                 </links>
8268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8269                         <actions>
8270                                 <retrieve permission="ADMIN_COPY_BUCKET">
8271                     <context link="bucket" owning_lib="owning_lib"/>
8272                 </retrieve>
8273             </actions>
8274         </permacrud>
8275         </class>
8276         <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">
8277                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
8278                         <field name="id" reporter:datatype="id" />
8279                         <field name="item" reporter:datatype="link"/>
8280                         <field name="note" reporter:datatype="text" />
8281                 </fields>
8282                 <links>
8283                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8284                 </links>
8285         </class>
8286         <class id="asce" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat_entry" oils_persist:tablename="asset.stat_cat_entry" reporter:label="Item Stat Cat Entry">
8287                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8288                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8289                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8290                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8291                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8292                 </fields>
8293                 <links>
8294                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8295                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8296                 </links>
8297                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8298                         <actions>
8299                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8300                         </actions>
8301                 </permacrud>
8302         </class>
8303     <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">
8304         <fields oils_persist:primary="field">
8305             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8306             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8307             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8308         </fields>
8309         <links/>
8310         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8311             <actions>
8312                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8313                 <retrieve />
8314                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8315                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8316             </actions>
8317         </permacrud>
8318     </class>
8319         <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">
8320                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8321                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8322                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8323                 </fields>
8324                 <links/>
8325         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8326             <actions>
8327                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8328                 <retrieve/>
8329                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8330                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8331             </actions>
8332         </permacrud>
8333         </class>
8334
8335
8336         <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">
8337                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8338                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8339                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8340                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8341                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8342                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8343                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8344                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8345                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8346                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8347                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8348                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8349                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8350                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8351                 </fields>
8352                 <links>
8353                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8354                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8355                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8356                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8357                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8358                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8359                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8360                 </links>
8361         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8362             <actions>
8363                 <create permission="TRANSIT_COPY">
8364                     <context link="target_copy" field="owner"/>
8365                 </create>
8366                 <retrieve/>
8367                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8368                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8369             </actions>
8370         </permacrud>
8371         </class>
8372         <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">
8373                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8374                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8375                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8376                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8377                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8378                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8379                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8380                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8381                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8382                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8383                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8384                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8385                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8386                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8387                 </fields>
8388                 <links>
8389                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8390                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8391                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8392                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8393                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8394                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8395                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8396                 </links>
8397         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8398             <actions>
8399                 <create permission="TRANSIT_COPY" context_field="owner">
8400                     <context link="target_copy" field="circ_lib"/>
8401                 </create>
8402                 <retrieve/>
8403                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8404                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8405             </actions>
8406         </permacrud>
8407         </class>
8408         <class id="mb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
8409                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8410                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8411                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8412                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8413                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8414                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8415                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8416                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8417                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8418                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8419                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8420                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8421                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8422                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8423                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8424                 </fields>
8425                 <links>
8426                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8427                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8428                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8429                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8430                 </links>
8431         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8432             <actions>
8433                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8434                     <context link="xact" jump="usr" field="home_ou"/>
8435                 </retrieve>
8436                         </actions>
8437                 </permacrud>
8438         </class>
8439         <class id="mab" controller="open-ils.cstore open-ils.pcrud" 
8440                 oils_obj:fieldmapper="money::aged_billing" 
8441                 oils_persist:tablename="money.aged_billing" 
8442                 reporter:label="Aged Billing Line Item">
8443                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8444                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8445                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8446                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8447                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8448                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8449                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8450                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8451                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8452                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8453                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8454                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8455                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8456                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8457                 </fields>
8458                 <links>
8459                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8460                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8461                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8462                 </links>
8463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8464                         <actions>
8465                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8466                                         <context link="xact" field="usr_home_ou"/>
8467                                 </retrieve>
8468                         </actions>
8469                 </permacrud>
8470         </class>
8471         <class id="mallb" controller="open-ils.cstore" 
8472                 oils_obj:fieldmapper="money::all_billings" 
8473                 oils_persist:tablename="money.all_billings" 
8474                 oils_persist="readonly" reporter:label="All Billing Line Items">
8475                 <fields oils_persist:primary="id" oils_persist:sequence="">
8476                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8477                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8478                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8479                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8480                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8481                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8482                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8483                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8484                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8485                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8486                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8487                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8488                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8489                 </fields>
8490                 <links>
8491                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8492                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8493                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8494                 </links>
8495         </class>
8496         <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">
8497                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8498                         <field name="grp" />
8499                         <field name="id" reporter:datatype="id" />
8500                         <field name="usr" />
8501                 </fields>
8502                 <links>
8503                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8504                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8505                 </links>
8506         </class>
8507         <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">
8508                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8509                         <field name="id" reporter:datatype="id" />
8510                         <field name="fq_field" reporter:datatype="text"/>
8511                         <field name="identity_value" reporter:datatype="text"/>
8512                         <field name="translation" reporter:datatype="text"/>
8513                         <field name="string" reporter:datatype="text"/>
8514                 </fields>
8515                 <links>
8516                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8517                 </links>
8518         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8519             <actions>
8520                 <create permission="CREATE_TRANSLATION" global_required="true"/>
8521                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8522                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8523                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8524             </actions>
8525         </permacrud>
8526         </class>
8527         <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">
8528                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8529                         <field name="id" reporter:datatype="id" />
8530                         <field name="fm_class" reporter:datatype="text"/>
8531                         <field name="field" reporter:datatype="text"/>
8532                         <field name="owner" reporter:datatype="org_unit"/>
8533                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8534                 </fields>
8535                 <links>
8536                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8537                 </links>
8538         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8539             <actions>
8540                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8541                 <retrieve/>
8542                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8543                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8544             </actions>
8545         </permacrud>
8546         </class>
8547         <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">
8548                 <fields oils_persist:primary="code">
8549                         <field name="code" reporter:datatype="id" />
8550                         <field name="marc_code" reporter:datatype="text"/>
8551                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8552                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8553                         <field name="rtl" reporter:datatype="bool"/>
8554                 </fields>
8555                 <links/>
8556         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8557             <actions>
8558                 <create permission="CREATE_LOCALE" global_required="true"/>
8559                 <retrieve/>
8560                 <update permission="UPDATE_LOCALE" global_required="true"/>
8561                 <delete permission="DELETE_LOCALE" global_required="true"/>
8562             </actions>
8563         </permacrud>
8564         </class>
8565         <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">
8566                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8567                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name" oils_obj:required="true"/>
8568                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true" oils_obj:required="true"/>
8569                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" oils_obj:required="true"/>
8570                         <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8571                 </fields>
8572                 <links>
8573                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8574                 </links>
8575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8576             <actions>
8577                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8578                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8579                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8580                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8581             </actions>
8582         </permacrud>
8583         </class>
8584
8585         <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">
8586                 <fields oils_persist:primary="id">
8587                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8588                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8589                 </fields>
8590                 <links/>
8591         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8592             <actions>
8593                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8594                 <retrieve/>
8595                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8596                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8597             </actions>
8598         </permacrud>
8599         </class>
8600
8601         <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">
8602                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8603                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8604                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8605                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8606                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8607                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8608                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8609                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8610                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8611                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8612                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8613                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8614                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8615                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8616                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8617                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8618                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8619                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8620                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8621                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8622                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8623                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8624                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8625                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8626                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8627                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8628                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8629                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8630                 </fields>
8631                 <links>
8632                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8633                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8634                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8635                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8636                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8637                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8638                 </links>
8639         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8640             <actions>
8641                 <create permission="user_request.create">
8642                     <context link="usr" field="home_ou"/>
8643                                 </create>
8644                 <retrieve permission="user_request.view">
8645                     <context link="usr" field="home_ou"/>
8646                                 </retrieve>
8647                 <update permission="user_request.update">
8648                     <context link="usr" field="home_ou"/>
8649                                 </update>
8650                 <delete permission="user_request.delete">
8651                     <context link="usr" field="home_ou"/>
8652                                 </delete>
8653             </actions>
8654         </permacrud>
8655         </class>
8656
8657         <class id="aurs" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status" reporter:label="User Purchase Request with Status" oils_persist="readonly">
8658         <oils_persist:source_definition><![CDATA[
8659             SELECT r.*, CASE
8660                         WHEN r.cancel_reason IS NOT NULL THEN 7 -- Canceled
8661                         WHEN h.fulfillment_time IS NOT NULL THEN 6 -- Fulfilled
8662                         WHEN l.state = 'received' THEN 5 -- Received
8663                         WHEN p.state = 'on-order' AND h.id IS NOT NULL THEN 4 -- Ordered, Hold Placed
8664                         WHEN p.state = 'on-order' AND h.id IS NULL THEN 3 -- Ordered, Hold Not Placed
8665                         WHEN l.id IS NOT NULL THEN 2 -- Pending
8666                         WHEN l.id IS NULL THEN 1 -- New
8667                         ELSE 0 -- Error
8668                     END AS request_status
8669                     ,u.home_ou
8670             FROM      acq.user_request r
8671             JOIN actor.usr u ON (r.usr = u.id)
8672             LEFT JOIN acq.lineitem l ON (r.lineitem = l.id)
8673             LEFT JOIN acq.purchase_order p ON (l.purchase_order = p.id)
8674             LEFT JOIN action.hold_request h ON (h.acq_request = r.id)
8675         ]]></oils_persist:source_definition>
8676                 <fields oils_persist:primary="id">
8677                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8678                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8679                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8680                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8681                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8682                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8683                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8684                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8685                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8686                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8687                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8688                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8689                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8690                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8691                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8692                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8693                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8694                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8695                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8696                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8697                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8698                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8699                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8700                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8701                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8702                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8703                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8704                         <field reporter:label="Request Status" name="request_status" reporter:datatype="link" />
8705                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="link"/>
8706                 </fields>
8707                 <links>
8708                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8709                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8710                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8711                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8712                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8713                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8714                         <link field="request_status" reltype="has_a" key="id" map="" class="aurst"/>
8715                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8716                 </links>
8717         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8718             <actions>
8719                 <retrieve permission="user_request.view">
8720                     <context link="usr" field="home_ou"/>
8721                                 </retrieve>
8722             </actions>
8723         </permacrud>
8724         </class>
8725
8726         <class id="aurst" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status_type" oils_persist:tablename="acq.user_request_status_type" reporter:label="Acquisition Patron Request Status Type">
8727                 <fields oils_persist:primary="id">
8728                         <field reporter:label="Status ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8729                         <field reporter:label="Status" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8730                 </fields>
8731                 <links/>
8732         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8733             <actions>
8734                 <retrieve/>
8735             </actions>
8736         </permacrud>
8737         </class>
8738
8739         <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">
8740                 <fields oils_persist:primary="code">
8741                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
8742                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8743                 </fields>
8744                 <links/>
8745         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8746             <actions>
8747                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8748                 <retrieve/>
8749                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8750                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8751             </actions>
8752         </permacrud>
8753         </class>
8754
8755         <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">
8756                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
8757                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
8758                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
8759                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
8760                         <field reporter:label="Ratio" name="ratio" />
8761                 </fields>
8762                 <links>
8763                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
8764                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
8765                 </links>
8766                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8767                         <actions>
8768                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8769                                 <retrieve/>
8770                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8771                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8772                         </actions>
8773                 </permacrud>
8774         </class>
8775
8776         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
8777                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
8778                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8779                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8780                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8781                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8782                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8783                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
8784                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
8785                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
8786                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
8787                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8788                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8789                         <field reporter:label="URL" name="url" reporter:datatype="text" />
8790                         <field reporter:label="Email" name="email" reporter:datatype="text" />
8791                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
8792                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
8793                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
8794                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
8795                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
8796                 </fields>
8797                 <links>
8798                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8799                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8800             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
8801             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
8802                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
8803                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
8804                 </links>
8805         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8806             <actions>
8807                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
8808                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
8809                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
8810                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
8811             </actions>
8812         </permacrud>
8813         </class>
8814
8815         <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">
8816                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
8817                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8818                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8819                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8820                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8821                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8822                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8823                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8824                 </fields>
8825                 <links>
8826                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8827                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8828                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8829                 </links>
8830         </class>
8831
8832         <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">
8833                 <fields oils_persist:primary="code">
8834                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
8835                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8836                 </fields>
8837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8838             <actions>
8839                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8840                 <retrieve/>
8841                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8842                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8843             </actions>
8844                 </permacrud>
8845         </class>
8846
8847         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
8848                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
8849                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
8850                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
8851                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8852                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
8853                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
8854                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
8855                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
8856                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
8857                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
8858                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
8859                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8860                         <field reporter:label="Close Date" name="close_date" reporter:datatype="timestamp" />
8861                         <field reporter:label="Closed By" name="closed_by" reporter:datatype="link" />
8862                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
8863                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
8864                 </fields>
8865                 <links>
8866                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
8867                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8868                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
8869                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
8870                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
8871                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
8872                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
8873                         <link field="closed_by" reltype="has_a" key="id" map="" class="au"/>
8874                 </links>
8875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8876             <actions>
8877                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
8878                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
8879                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
8880                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
8881             </actions>
8882         </permacrud>
8883         </class>
8884
8885         <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">
8886                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
8887                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8888                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8889                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8890                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
8891                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
8892                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
8893                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8894                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
8895                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8896                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8897                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8898                 </fields>
8899                 <links>
8900                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8901                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
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="ADMIN_INVOICE">
8907                                         <context link="invoice" field="receiver"/>
8908                                 </create>
8909                 <retrieve permission="ADMIN_INVOICE">
8910                                         <context link="invoice" field="receiver"/>
8911                                 </retrieve>
8912                 <update   permission="ADMIN_INVOICE">
8913                                         <context link="invoice" field="receiver"/>
8914                                 </update>
8915                                 <delete   permission="ADMIN_INVOICE">
8916                                         <context link="invoice" field="receiver"/>
8917                                 </delete>
8918             </actions>
8919         </permacrud>
8920         </class>
8921
8922         <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">
8923                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
8924                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8925                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8926                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8927                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8928                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
8929                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
8930                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8931                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8932                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8933                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8934                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8935                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8936                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
8937                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8938                 </fields>
8939                 <links>
8940                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8941                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8942                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8943                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8944                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8945                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8946                 </links>
8947         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8948             <actions>
8949                 <create   permission="ADMIN_INVOICE">
8950                                         <context link="invoice" field="receiver"/>
8951                                 </create>
8952                 <retrieve permission="ADMIN_INVOICE">
8953                                         <context link="invoice" field="receiver"/>
8954                                 </retrieve>
8955                 <update   permission="ADMIN_INVOICE">
8956                                         <context link="invoice" field="receiver"/>
8957                                 </update>
8958                                 <delete   permission="ADMIN_INVOICE">
8959                                         <context link="invoice" field="receiver"/>
8960                                 </delete>
8961             </actions>
8962         </permacrud>
8963         </class>
8964
8965         <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">
8966                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8967                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8968                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8969                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8970                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8971                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8972                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8973                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8974                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8975                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8976                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8977                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8978                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8979                 </fields>
8980                 <links>
8981                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8982                 </links>
8983         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8984             <actions>
8985                 <create permission="ADMIN_PROVIDER">
8986                     <context link="provider" field="owner"/>
8987                 </create>
8988                 <retrieve permission="ADMIN_PROVIDER">
8989                     <context link="provider" field="owner"/>
8990                 </retrieve>
8991                 <update permission="ADMIN_PROVIDER">
8992                     <context link="provider" field="owner"/>
8993                 </update>
8994                 <delete permission="ADMIN_PROVIDER">
8995                     <context link="provider" field="owner"/>
8996                 </delete>
8997             </actions>
8998         </permacrud>
8999         </class>
9000
9001         <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">
9002                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
9003                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9004                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9005                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9006                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
9007                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
9008                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
9009         </fields>
9010                 <links>
9011                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9012                 </links>
9013         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9014             <actions>
9015                 <create permission="ADMIN_PROVIDER">
9016                     <context link="provider" field="owner"/>
9017                 </create>
9018                 <retrieve permission="ADMIN_PROVIDER">
9019                     <context link="provider" field="owner"/>
9020                 </retrieve>
9021                 <update permission="ADMIN_PROVIDER">
9022                     <context link="provider" field="owner"/>
9023                 </update>
9024                 <delete permission="ADMIN_PROVIDER">
9025                     <context link="provider" field="owner"/>
9026                 </delete>
9027             </actions>
9028         </permacrud>
9029     </class>
9030         <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">
9031                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
9032                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
9033                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
9034                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
9035                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9036                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
9037                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9038                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
9039                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
9040                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
9041                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
9042                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
9043                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9044                 </fields>
9045                 <links>
9046                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
9047                 </links>
9048         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9049             <actions>
9050                 <create permission="ADMIN_PROVIDER">
9051                     <context link="contact" jump='provider' field="owner"/>
9052                 </create>
9053                 <retrieve permission="ADMIN_PROVIDER">
9054                     <context link="contact" jump='provider' field="owner"/>
9055                 </retrieve>
9056                 <update permission="ADMIN_PROVIDER">
9057                     <context link="contact" jump='provider' field="owner"/>
9058                 </update>
9059                 <delete permission="ADMIN_PROVIDER">
9060                     <context link="contact" jump='provider' field="owner"/>
9061                 </delete>
9062             </actions>
9063         </permacrud>
9064         </class>
9065
9066         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
9067                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
9068                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
9069                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
9070                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
9071                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
9072                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
9073                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
9074                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
9075                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9076                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
9077                 </fields>
9078                 <links>
9079                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
9080                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
9081                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
9082                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9083                 </links>
9084         </class>
9085
9086         <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">
9087                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
9088                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9089                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
9090                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
9091                 </fields>
9092                 <links>
9093             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
9094                 </links>
9095                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9096                         <actions>
9097                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9098                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9099                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9100                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9101                         </actions>
9102                 </permacrud>
9103         </class>
9104
9105         <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">
9106                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
9107                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
9108                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
9109                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
9110                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
9111                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
9112                 </fields>
9113                 <links>
9114                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
9115                 </links>
9116                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9117                         <actions>
9118                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9119                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9120                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9121                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9122                         </actions>
9123                 </permacrud>
9124         </class>
9125
9126         <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">
9127                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
9128                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9129                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9130                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
9131                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
9132                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9133                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9134                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9135                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
9136                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
9137                 </fields>
9138                 <links>
9139                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9140                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9141             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
9142             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
9143                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
9144                 </links>
9145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9146             <actions>
9147                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9148                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
9149                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9150                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9151             </actions>
9152         </permacrud>
9153         </class>
9154
9155         <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">
9156                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
9157                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
9158                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
9159                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9160                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9161                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
9162                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
9163                 </fields>
9164                 <links>
9165                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9166                 </links>
9167                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9168                         <actions>
9169                                 <create permission="ADMIN_FUNDING_SOURCE">
9170                     <context link="funding_source" field="owner"/>
9171                 </create>
9172                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
9173                     <context link="funding_source" field="owner"/>
9174                 </retrieve>
9175                                 <update permission="ADMIN_FUNDING_SOURCE">
9176                     <context link="funding_source" field="owner"/>
9177                 </update>
9178                                 <delete permission="ADMIN_FUNDING_SOURCE">
9179                     <context link="funding_source" field="owner"/>
9180                 </delete>
9181                         </actions>
9182                 </permacrud>
9183         </class>
9184
9185         <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">
9186                 <fields oils_persist:primary="id">
9187                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
9188                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
9189                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
9190                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
9191                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
9192                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9193                 </fields>
9194                 <links>
9195                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9196                 </links>
9197         </class>
9198
9199         <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">
9200                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
9201                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
9202                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9203                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
9204                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
9205                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9206                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
9207                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
9208                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9209                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
9210                 </fields>
9211                 <links>
9212                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9213                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9214                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
9215                 </links>
9216                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9217                         <actions>
9218                                 <create permission="ADMIN_ACQ_FUND">
9219                     <context link="fund" field="org"/>
9220                 </create>
9221                                 <retrieve permission="ADMIN_ACQ_FUND">
9222                     <context link="fund" field="org"/>
9223                 </retrieve>
9224                                 <update permission="ADMIN_ACQ_FUND">
9225                     <context link="fund" field="org"/>
9226                 </update>
9227                                 <delete permission="ADMIN_ACQ_FUND">
9228                     <context link="fund" field="org"/>
9229                 </delete>
9230                         </actions>
9231                 </permacrud>
9232         </class>
9233
9234         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
9235                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9236                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9237                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9238                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9239                         <field reporter:label="Year" name="year" reporter:datatype="int" />
9240                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9241                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9242                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9243                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9244                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9245                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9246                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9247                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9248                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9249                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
9250                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
9251                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
9252                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
9253                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
9254                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
9255                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9256                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9257                 </fields>
9258                 <links>
9259                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9260                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9261             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
9262             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
9263             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
9264             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
9265             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
9266             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
9267             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
9268             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
9269             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
9270                 </links>
9271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
9272             <actions>
9273                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
9274                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9275                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
9276                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
9277             </actions>
9278         </permacrud>
9279         </class>
9280
9281         <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">
9282                 <fields oils_persist:primary="fund">
9283                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9284                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9285                 </fields>
9286                 <links>
9287                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9288                 </links>
9289         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9290             <actions>
9291                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9292                                         <context link="fund" field="org" />
9293                 </retrieve>
9294             </actions>
9295         </permacrud>
9296         </class>
9297
9298         <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">
9299                 <fields oils_persist:primary="fund">
9300                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9301                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
9302                 </fields>
9303                 <links>
9304                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9305                 </links>
9306         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9307             <actions>
9308                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9309                                         <context link="fund" field="org" />
9310                 </retrieve>
9311             </actions>
9312         </permacrud>
9313         </class>
9314
9315         <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">
9316                 <fields oils_persist:primary="fund">
9317                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9318                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
9319                 </fields>
9320                 <links>
9321                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9322                 </links>
9323         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9324             <actions>
9325                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9326                                         <context link="fund" field="org" />
9327                 </retrieve>
9328             </actions>
9329         </permacrud>
9330         </class>
9331
9332         <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">
9333                 <fields oils_persist:primary="fund">
9334                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9335                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9336                 </fields>
9337                 <links>
9338                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9339                 </links>
9340         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9341             <actions>
9342                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9343                                         <context link="fund" field="org" />
9344                 </retrieve>
9345             </actions>
9346         </permacrud>
9347         </class>
9348
9349         <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">
9350                 <fields oils_persist:primary="fund">
9351                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9352                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
9353                 </fields>
9354                 <links>
9355                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9356                 </links>
9357         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9358             <actions>
9359                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9360                                         <context link="fund" field="org" />
9361                 </retrieve>
9362             </actions>
9363         </permacrud>
9364         </class>
9365
9366    <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">
9367         <fields oils_persist:primary="fund">
9368             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9369             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9370         </fields>
9371         <links>
9372             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9373         </links>
9374     </class>
9375
9376    <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">
9377         <fields oils_persist:primary="fund">
9378             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9379             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
9380         </fields>
9381         <links>
9382             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9383         </links>
9384     </class>
9385
9386    <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">
9387         <fields oils_persist:primary="fund">
9388             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9389             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9390         </fields>
9391         <links>
9392             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9393         </links>
9394     </class>
9395
9396    <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">
9397         <fields oils_persist:primary="fund">
9398             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9399             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
9400         </fields>
9401         <links>
9402             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9403         </links>
9404     </class>
9405
9406    <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">
9407         <fields oils_persist:primary="fund">
9408             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9409             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
9410         </fields>
9411         <links>
9412             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9413         </links>
9414     </class>
9415
9416         <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">
9417                 <fields oils_persist:primary="funding_source">
9418                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9419                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
9420                 </fields>
9421                 <links>
9422                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9423                 </links>
9424         </class>
9425
9426         <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">
9427                 <fields oils_persist:primary="funding_source">
9428                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9429                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
9430                 </fields>
9431                 <links>
9432                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9433                 </links>
9434         </class>
9435
9436         <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">
9437                 <fields oils_persist:primary="funding_source">
9438                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9439                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
9440                 </fields>
9441                 <links>
9442                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9443                 </links>
9444         </class>
9445
9446         <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">
9447                 <fields oils_persist:primary="fund">
9448                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9449                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9450                 </fields>
9451                 <links>
9452                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9453                 </links>
9454         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9455             <actions>
9456                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9457                                         <context link="fund" field="org" />
9458                 </retrieve>
9459             </actions>
9460         </permacrud>
9461     </class>
9462     <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">
9463         <oils_persist:source_definition><![CDATA[
9464             SELECT
9465                 acqf.*,
9466                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9467                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9468                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9469                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9470             FROM
9471                 acq.fund acqf
9472                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9473                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9474                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
9475                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
9476         ]]></oils_persist:source_definition>
9477         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9478             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9479             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9480             <field reporter:label="Name" name="name" reporter:datatype="text" />
9481             <field reporter:label="Year" name="year" reporter:datatype="int" />
9482             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9483             <field reporter:label="Code" name="code" reporter:datatype="text" />
9484             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9485             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9486             <field reporter:label="Active" name="active" reporter:datatype="bool" />
9487             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9488             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9489
9490             <!-- non fund-native fields -->
9491             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
9492             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
9493             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
9494             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
9495         </fields>
9496         <links>
9497             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
9498             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9499             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9500         </links>
9501         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9502             <actions>
9503                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9504             </actions>
9505         </permacrud>
9506         </class>
9507         <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">
9508                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
9509                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9510                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9511                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9512                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9513                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9514                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9515                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9516                 </fields>
9517                 <links>
9518                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9519                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9520                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9521                 </links>
9522                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9523                         <actions>
9524                                 <create permission="ADMIN_ACQ_FUND">
9525                     <context link="fund" field="org"/>
9526                 </create>
9527                                 <retrieve permission="ADMIN_ACQ_FUND">
9528                     <context link="fund" field="org"/>
9529                 </retrieve>
9530                                 <update permission="ADMIN_ACQ_FUND">
9531                     <context link="fund" field="org"/>
9532                 </update>
9533                                 <delete permission="ADMIN_ACQ_FUND">
9534                     <context link="fund" field="org"/>
9535                 </delete>
9536                         </actions>
9537                 </permacrud>
9538         </class>
9539
9540     <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">
9541         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
9542             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9543             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9544             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9545             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
9546             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
9547             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9548             <field reporter:label="Note" name="note" reporter:datatype="text" />
9549             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9550         </fields>
9551         <links>
9552             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9553             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9554             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9555         </links>
9556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9557                         <actions>
9558                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9559                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9560                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9561                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9562                         </actions>
9563                 </permacrud>
9564     </class>
9565
9566         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
9567                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
9568                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
9569                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9570                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
9571                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9572                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9573                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9574                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
9575                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
9576                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9577                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9578                 </fields>
9579                 <links>
9580                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9581                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9582                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9583                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9584                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
9585                 </links>
9586                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9587                         <actions>
9588                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
9589                         </actions>
9590                 </permacrud>
9591         </class>
9592
9593         <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">
9594                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
9595                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9596                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
9597                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9598                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9599                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
9600                 </fields>
9601                 <links>
9602                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9603                 </links>
9604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9605                         <actions>
9606                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9607                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
9608                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9609                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9610                         </actions>
9611                 </permacrud>
9612         </class>
9613
9614         <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">
9615                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
9616                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9617                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9618                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9619                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9620                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9621                         <field reporter:label="State" name="state" reporter:datatype="text" />
9622                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
9623                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9624                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9625                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
9626                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9627                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9628                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9629                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
9630                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
9631                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
9632                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
9633                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
9634                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
9635                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9636                 </fields>
9637                 <links>
9638                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9639                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9640                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9641                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
9642                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9643                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
9644                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
9645                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
9646                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9647                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9648                 </links>
9649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9650                         <actions>
9651                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9652                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9653                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9654                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9655                         </actions>
9656                 </permacrud>
9657         </class>
9658
9659         <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">
9660                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
9661                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9662                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9663                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9664                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
9665                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9666                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9667                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9668                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9669                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9670                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9671                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9672                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9673                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
9674                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9675                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9676                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9677                 </fields>
9678                 <links>
9679                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
9680                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9681                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9682                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9683                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9684                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9685                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9686                 </links>
9687                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9688             <actions>
9689                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9690             </actions>
9691                 </permacrud>
9692         </class>
9693
9694         <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">
9695                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
9696                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9697                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9698                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9699                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9700                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9701                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9702                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
9703                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9704                 </fields>
9705                 <links>
9706                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9707                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9708                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9709                 </links>
9710                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9711             <actions>
9712                 <create permission="CREATE_PURCHASE_ORDER">
9713                     <context link="purchase_order" field="ordering_agency"/>
9714                 </create>
9715                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9716                     <context link="purchase_order" field="ordering_agency"/>
9717                 </retrieve>
9718                 <update permission="CREATE_PURCHASE_ORDER">
9719                     <context link="purchase_order" field="ordering_agency"/>
9720                 </update>
9721                 <delete permission="CREATE_PURCHASE_ORDER">
9722                     <context link="purchase_order" field="ordering_agency"/>
9723                 </delete>
9724             </actions>
9725                 </permacrud>
9726         </class>
9727
9728         <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">
9729                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
9730                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9731                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9732                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9733                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
9734                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
9735                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
9736                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9737                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
9738                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9739                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9740                 </fields>
9741                 <links>
9742                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9743                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9744                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9745                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9746                 </links>
9747                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9748             <actions>
9749                 <create permission="CREATE_PURCHASE_ORDER">
9750                     <context link="purchase_order" field="ordering_agency"/>
9751                 </create>
9752                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9753                     <context link="purchase_order" field="ordering_agency"/>
9754                 </retrieve>
9755                 <update permission="CREATE_PURCHASE_ORDER">
9756                     <context link="purchase_order" field="ordering_agency"/>
9757                 </update>
9758                 <delete permission="CREATE_PURCHASE_ORDER">
9759                     <context link="purchase_order" field="ordering_agency"/>
9760                 </delete>
9761             </actions>
9762                 </permacrud>
9763         </class>
9764
9765         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
9766                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
9767                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
9768                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
9769                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
9770                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9771                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9772                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9773                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9774                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
9775                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
9776                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
9777                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
9778                         <field reporter:label="State" name="state" reporter:datatype="text" />
9779                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9780                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9781                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
9782                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9783                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9784                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9785                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
9786                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9787                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9788                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
9789                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
9790                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
9791                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
9792                 </fields>
9793                 <links>
9794                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9795                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9796                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9797                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9798                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9799                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9800                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9801                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
9802                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
9803                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
9804                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9805                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
9806                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9807                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
9808                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
9809                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9810                 </links>
9811                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9812                         <actions>
9813                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
9814                                         <context link="purchase_order" field="ordering_agency"/>
9815                                         <context link="picklist" field="org_unit"/>
9816                                 </retrieve>
9817                         </actions>
9818                 </permacrud>
9819         </class>
9820
9821         <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">
9822                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
9823                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9824                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9825                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9826                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
9827                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9828                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9829                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
9830                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9831                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9832                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
9833                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
9834                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9835                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9836                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
9837                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
9838                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
9839                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9840                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
9841                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9842                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9843                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9844                 </fields>
9845                 <links>
9846                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
9847                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9848                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9849                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9850                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9851                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9852                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9853                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9854                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9855                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9856                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9857                 </links>
9858                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9859                         <actions>
9860                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9861                                         <context link="purchase_order" field="ordering_agency"/>
9862                                         <context link="picklist" field="org_unit"/>
9863                                 </retrieve>
9864                         </actions>
9865                 </permacrud>
9866         </class>
9867
9868         <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">
9869                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
9870                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
9871                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9872                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9873                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9874                 </fields>
9875                 <links>
9876                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9877                 </links>
9878                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9879                         <actions>
9880                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9881                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
9882                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9883                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9884                         </actions>
9885                 </permacrud>
9886         </class>
9887
9888         <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">
9889                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
9890                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
9891                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
9892                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9893                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9894                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9895                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9896                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9897                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
9898                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9899                 </fields>
9900                 <links>
9901                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9902                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9903                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9904                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
9905                 </links>
9906         </class>
9907
9908         <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">
9909                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
9910                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
9911                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
9912                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
9913                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
9914                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
9915                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
9916                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
9917                 </fields>
9918                 <links>
9919                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9920                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
9921                 </links>
9922         </class>
9923
9924         <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">
9925                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
9926                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
9927                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9928                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
9929                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
9930                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
9931                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
9932                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
9933                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9934                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
9935                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9936                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
9937                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
9938                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9939                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
9940                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9941                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9942                 </fields>
9943                 <links>
9944                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9945                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9946                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9947                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9948                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9949                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9950                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9951                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9952                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9953                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9954                 </links>
9955         </class>
9956
9957         <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">
9958                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9959                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9960                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9961                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9962                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9963                 </fields>
9964                 <links/>
9965                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9966                         <actions>
9967                                 <retrieve />
9968                         </actions>
9969                 </permacrud>
9970         </class>
9971
9972         <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">
9973                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9974                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9975                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9976                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9977                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9978                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9979             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9980                 </fields>
9981                 <links/>
9982         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9983             <actions>
9984                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9985                 <retrieve />
9986                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9987                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9988             </actions>
9989         </permacrud>
9990         </class>
9991
9992         <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">
9993                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9994                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9995                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9996                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9997                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9998                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9999                 </fields>
10000                 <links/>
10001         </class>
10002         <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">
10003                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10004                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10005                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10006                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10007                         <field reporter:label="User" name="usr" reporter:datatype="link" />
10008                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10009                 </fields>
10010                 <links>
10011                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10012                 </links>
10013         </class>
10014
10015         <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">
10016             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10017                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10018                 <field reporter:label="Code" name="code" reporter:datatype="text" />
10019                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10020                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10021                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10022                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10023         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
10024
10025             </fields>
10026             <links>
10027                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10028             </links>
10029             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10030                 <actions>
10031                     <create permission="ADMIN_PROVIDER">
10032                         <context link="provider" field="owner"/>
10033                     </create>
10034                     <retrieve permission="ADMIN_PROVIDER">
10035                         <context link="provider" field="owner"/>
10036                     </retrieve>
10037                     <update permission="ADMIN_PROVIDER">
10038                         <context link="provider" field="owner"/>
10039                     </update>
10040                     <delete permission="ADMIN_PROVIDER">
10041                         <context link="provider" field="owner"/>
10042                     </delete>
10043                 </actions>
10044             </permacrud>
10045         </class>
10046         
10047         <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">
10048             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
10049                 <field reporter:label="ID" name="id" reporter:datatype="id" />
10050                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10051                 <field reporter:label="Name" name="name" reporter:datatype="text" />
10052                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
10053             </fields>
10054             <links>
10055                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10056             </links>
10057             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10058                 <actions>
10059                     <create permission="ADMIN_PROVIDER">
10060                         <context link="provider" field="owner"/>
10061                     </create>
10062                     <retrieve permission="ADMIN_PROVIDER">
10063                         <context link="provider" field="owner"/>
10064                     </retrieve>
10065                     <update permission="ADMIN_PROVIDER">
10066                         <context link="provider" field="owner"/>
10067                     </update>
10068                     <delete permission="ADMIN_PROVIDER">
10069                         <context link="provider" field="owner"/>
10070                     </delete>
10071                 </actions>
10072             </permacrud>
10073         </class>
10074         
10075         <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">
10076             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10077                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10078                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10079                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10080                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10081                 </fields>
10082                 <links/>
10083         </class>
10084
10085         <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">
10086                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
10087                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
10088                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
10089                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
10090                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
10091                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
10092                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
10093                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
10094                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
10095                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
10096                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
10097                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
10098                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
10099                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
10100                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
10101                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes"/>
10102                 </fields>
10103                 <links>
10104                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10105                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10106                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10107                 </links>
10108         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10109             <actions>
10110                 <create permission="ADMIN_PROVIDER">
10111                     <context link="provider" field="owner"/>
10112                 </create>
10113                 <retrieve permission="ADMIN_PROVIDER">
10114                     <context link="provider" field="owner"/>
10115                 </retrieve>
10116                 <update permission="ADMIN_PROVIDER">
10117                     <context link="provider" field="owner"/>
10118                 </update>
10119                 <delete permission="ADMIN_PROVIDER">
10120                     <context link="provider" field="owner"/>
10121                 </delete>
10122             </actions>
10123         </permacrud>
10124         </class>
10125
10126         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
10127                 oils_obj:fieldmapper="acq::edi_attr" 
10128                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
10129                 <fields oils_persist:primary="key">
10130                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
10131                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10132                 </fields>
10133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10134             <actions>
10135                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10136                 <retrieve/>
10137                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10138                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10139             </actions>
10140         </permacrud>
10141         </class>
10142         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
10143                 oils_obj:fieldmapper="acq::edi_attr_set" 
10144                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
10145                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
10146                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10147                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10148                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
10149                 </fields>
10150                 <links>
10151                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
10152                 </links>
10153         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10154             <actions>
10155                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10156                 <retrieve/>
10157                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10158                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10159             </actions>
10160         </permacrud>
10161         </class>
10162         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
10163                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
10164                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
10165                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
10166                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10167                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
10168                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
10169                 </fields>
10170                 <links>
10171                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10172                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
10173                 </links>
10174         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10175             <actions>
10176                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10177                 <retrieve/>
10178                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10179                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10180             </actions>
10181         </permacrud>
10182         </class>
10183
10184
10185         <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">
10186                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
10187                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
10188                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
10189                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
10190                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
10191                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
10192                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
10193                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
10194                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
10195                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
10196                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
10197                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
10198                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
10199                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
10200                 </fields>
10201                 <links>
10202                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
10203                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10204                 </links>
10205         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10206             <actions>
10207                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10208                     <context link="account" jump="provider" field="owner"/>
10209                 </retrieve>
10210                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10211                     <context link="account" jump="provider" field="owner"/>
10212                 </update>
10213                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10214                     <context link="account" jump="provider" field="owner"/>
10215                 </delete>
10216             </actions>
10217         </permacrud>
10218         </class>
10219
10220
10221         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
10222                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
10223                         <field name="id" reporter:datatype="id" />
10224                         <field name="parent" reporter:datatype="link"/>
10225                         <field name="owner" reporter:datatype="link"/>
10226                         <field name="create_time" reporter:datatype="timestamp"/>
10227                         <field name="name" reporter:datatype="text"/>
10228                         <field name="shared" reporter:datatype="bool"/>
10229                         <field name="share_with" reporter:datatype="link"/>
10230                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10231                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
10232                 </fields>
10233                 <links>
10234                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10235                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
10236                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
10237                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10238                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
10239                 </links>
10240         </class>
10241         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
10242                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
10243                         <field name="id" reporter:datatype="id" />
10244                         <field name="parent" reporter:datatype="link"/>
10245                         <field name="owner" reporter:datatype="link"/>
10246                         <field name="create_time" reporter:datatype="timestamp"/>
10247                         <field name="name" reporter:datatype="text"/>
10248                         <field name="shared" reporter:datatype="bool"/>
10249                         <field name="share_with" reporter:datatype="link"/>
10250                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10251                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
10252                 </fields>
10253                 <links>
10254                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10255                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
10256                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
10257                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10258                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
10259                 </links>
10260         </class>
10261         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
10262                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
10263                         <field name="id" reporter:datatype="id" />
10264                         <field name="parent" reporter:datatype="link"/>
10265                         <field name="owner" reporter:datatype="link"/>
10266                         <field name="create_time" reporter:datatype="timestamp"/>
10267                         <field name="name" reporter:datatype="text"/>
10268                         <field name="shared" reporter:datatype="bool"/>
10269                         <field name="share_with" reporter:datatype="link"/>
10270                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10271                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10272                 </fields>
10273                 <links>
10274                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10275                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
10276                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
10277                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10278                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
10279                 </links>
10280         </class>
10281         <class id="rt" controller="open-ils.reporter-store open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
10282                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
10283                         <field name="id" reporter:datatype="id" />
10284                         <field name="owner" reporter:datatype="link"/>
10285                         <field name="create_time" reporter:datatype="timestamp"/>
10286                         <field name="name" reporter:datatype="text"/>
10287                         <field name="data" reporter:datatype="text"/>
10288                         <field name="folder" reporter:datatype="link"/>
10289                         <field name="description" reporter:datatype="text"/>
10290                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10291                 </fields>
10292                 <links>
10293                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10294                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
10295                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
10296                 </links>
10297         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10298             <actions>
10299                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10300                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10301                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10302                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10303             </actions>
10304         </permacrud>
10305         </class>
10306         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
10307                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
10308                         <field name="id" reporter:datatype="id" />
10309                         <field name="owner" reporter:datatype="link"/>
10310                         <field name="create_time" reporter:datatype="timestamp"/>
10311                         <field name="template" reporter:datatype="link"/>
10312                         <field name="data" reporter:datatype="text"/>
10313                         <field name="folder" reporter:datatype="link"/>
10314                         <field name="recur" reporter:datatype="bool"/>
10315                         <field name="recurrence" reporter:datatype="interval"/>
10316                         <field name="name" reporter:datatype="text"/>
10317                         <field name="description" reporter:datatype="text"/>
10318                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
10319                 </fields>
10320                 <links>
10321                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10322                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
10323                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
10324                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
10325                 </links>
10326         </class>
10327         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
10328                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
10329                         <field name="id" reporter:datatype="id" />
10330                         <field name="runner" reporter:datatype="link"/>
10331                         <field name="start_time" reporter:datatype="timestamp"/>
10332                         <field name="complete_time" reporter:datatype="timestamp"/>
10333                         <field name="run_time" reporter:datatype="timestamp"/>
10334                         <field name="email" reporter:datatype="text"/>
10335                         <field name="excel_format" reporter:datatype="bool"/>
10336                         <field name="csv_format" reporter:datatype="bool"/>
10337                         <field name="html_format" reporter:datatype="bool"/>
10338                         <field name="error_code" reporter:datatype="int"/>
10339                         <field name="error_text" reporter:datatype="text"/>
10340                         <field name="report" reporter:datatype="link"/>
10341                         <field name="folder" reporter:datatype="link"/>
10342                         <field name="chart_pie" reporter:datatype="bool"/>
10343                         <field name="chart_bar" reporter:datatype="bool"/>
10344                         <field name="chart_line" reporter:datatype="bool"/>
10345                 </fields>
10346                 <links>
10347                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
10348                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
10349                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
10350                 </links>
10351         </class>
10352         <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">
10353                 <fields oils_persist:primary="id">
10354                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10355                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10356                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10357                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10358                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10359                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10360                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10361                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10362                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10363                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10364                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10365                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10366                 </fields>
10367                 <links>
10368                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10369                 </links>
10370                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10371                         <actions>
10372                                 <retrieve />
10373                         </actions>
10374                 </permacrud>
10375         </class>
10376         <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">
10377                 <fields oils_persist:primary="id">
10378                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10379                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10380                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10381                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10382                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10383                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10384                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10385                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10386                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10387                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10388                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10389                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10390                 </fields>
10391                 <links>
10392                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10393                 </links>
10394         </class>
10395         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
10396                 <fields oils_persist:primary="id">
10397                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10398                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
10399                         <field reporter:label="Fingerprint" name="fingerprint" />
10400                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10401                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10402                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10403                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10404                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
10405                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10406                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10407                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10408                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
10409                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
10410                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
10411                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10412                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10413                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
10414                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
10415                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
10416                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
10417                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
10418                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
10419                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10420                 </fields>
10421                 <links>
10422                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10423                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10424                 </links>
10425         </class>
10426         <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">
10427                 <fields oils_persist:primary="id">
10428                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10429                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10430                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10431                 </fields>
10432                 <links>
10433                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10434                 </links>
10435         </class>
10436         <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">
10437                 <fields oils_persist:primary="id">
10438                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10439                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10440                 </fields>
10441                 <links>
10442                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10443                 </links>
10444         </class>
10445         <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">
10446                 <fields oils_persist:primary="id">
10447                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10448                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10449                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10450                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10451                 </fields>
10452                 <links>
10453                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10454                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10455                 </links>
10456         </class>
10457         <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">
10458                 <fields oils_persist:primary="xact">
10459                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10460                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="money" />
10461                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
10462                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
10463                 </fields>
10464                 <links>
10465                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10466                 </links>
10467         </class>
10468         <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">
10469                 <fields oils_persist:primary="xact">
10470                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10471                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="money" />
10472                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
10473                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
10474                 </fields>
10475                 <links>
10476                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10477                 </links>
10478         </class>
10479         <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)">
10480                 <fields oils_persist:primary="id">
10481                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
10482                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
10483                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
10484                 </fields>
10485                 <links>
10486                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10487                 </links>
10488         </class>
10489         <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">
10490                 <fields oils_persist:primary="id">
10491                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
10492                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
10493                 </fields>
10494                 <links>
10495                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10496                 </links>
10497         </class>
10498         <class id="erccpo" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::copy_count_per_org" oils_persist:tablename="extend_reporter.copy_count_per_org" reporter:label="Library Holdings Count with Deleted">
10499                 <fields oils_persist:primary="bibid">
10500                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
10501                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
10502                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
10503                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
10504                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
10505                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
10506                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
10507                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
10508                 </fields>
10509                 <links>
10510                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
10511                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10512                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10513                 </links>
10514         </class>
10515         <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">
10516                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
10517                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
10518                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
10519                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
10520                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
10521                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
10522                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
10523                 </fields>
10524                 <links>
10525                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10526                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
10527                 </links>
10528                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10529                         <actions>
10530                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10531                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10532                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10533                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10534                         </actions>
10535                 </permacrud>
10536         </class>
10537         <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">
10538                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
10539                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
10540                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
10541                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
10542                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10543                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10544                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
10545                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10546                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
10547                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
10548                 </fields>
10549                 <links>
10550                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10551                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10552                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10553                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10554                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10555                 </links>
10556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10557                         <actions>
10558                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
10559                                         <context link="formula" field="owner"/>
10560                                 </create>
10561                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
10562                                         <context link="formula" field="owner"/>
10563                                 </retrieve>
10564                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
10565                                         <context link="formula" field="owner"/>
10566                                 </update>
10567                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
10568                                         <context link="formula" field="owner"/>
10569                                 </delete>
10570                         </actions>
10571                 </permacrud>
10572         </class>
10573
10574         <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">
10575                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
10576                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10577                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10578                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10579                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
10580                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10581                 </fields>
10582                 <links>
10583                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10584                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10585                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10586                 </links>
10587                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10588                         <actions>
10589                                 <create permission="CREATE_PURCHASE_ORDER">
10590                                         <context link="formula" field="owner"/>
10591                 </create>
10592                                 <retrieve permission="CREATE_PURCHASE_ORDER">
10593                                         <context link="formula" field="owner"/>
10594                 </retrieve>
10595                                 <update permission="CREATE_PURCHASE_ORDER">
10596                                         <context link="formula" field="owner"/>
10597                 </update>
10598                                 <delete permission="CREATE_PURCHASE_ORDER">
10599                                         <context link="formula" field="owner"/>
10600                 </delete>
10601                         </actions>
10602                 </permacrud>
10603         </class>
10604
10605         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
10606                 <fields oils_persist:primary="id">
10607                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
10608                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10609                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
10610                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
10611                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
10612                 </fields>
10613                 <links>
10614                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10615                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
10616                 </links>
10617         </class>
10618
10619         <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">
10620                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
10621                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10622                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10623                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10624                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10625                 </fields>
10626                 <links>
10627                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10628                 </links>
10629                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10630                         <actions>
10631                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10632                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10633                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10634                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10635                         </actions>
10636                 </permacrud>
10637         </class>
10638
10639         <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">
10640                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
10641                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10642                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10643                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10644                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10645                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
10646                 </fields>
10647                 <links>
10648                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10649                 </links>
10650                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10651                         <actions>
10652                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10653                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10654                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10655                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10656                         </actions>
10657                 </permacrud>
10658         </class>
10659
10660         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
10661                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
10662                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10663                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10664                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10665                 </fields>
10666                 <links>
10667                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10668                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10669                 </links>
10670         </class>
10671
10672         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
10673                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
10674                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10675                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10676                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10677                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10678                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10679                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10680                 </fields>
10681                 <links>
10682                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10683                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
10684                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10685                 </links>
10686         </class>
10687
10688         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
10689                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
10690                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10691                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10692                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
10693                 </fields>
10694                 <links>
10695                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10696                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
10697                 </links>
10698         </class>
10699
10700         <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">
10701                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
10702                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10703                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10704                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10705                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10706                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10707                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10708                 </fields>
10709                 <links>
10710                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10711                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
10712                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10713                 </links>
10714         </class>
10715
10716         <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">
10717                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
10718                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
10719                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10720                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
10721                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10722                 </fields>
10723                 <links>
10724                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10725                 </links>
10726                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10727             <actions>
10728                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10729                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
10730                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10731                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10732             </actions>
10733                 </permacrud>
10734         </class>
10735
10736         <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">
10737                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
10738                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
10739                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
10740                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
10741                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
10742                 </fields>
10743                 <links>
10744                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10745                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
10746                 </links>
10747                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10748                         <actions>
10749                                 <create permission="ADMIN_CLAIM_POLICY">
10750                                         <context link="claim_policy" field="org_unit"/>
10751                 </create>
10752                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
10753                                         <context link="claim_policy" field="org_unit"/>
10754                 </retrieve>
10755                                 <update permission="ADMIN_CLAIM_POLICY">
10756                                         <context link="claim_policy" field="org_unit"/>
10757                 </update>
10758                                 <delete permission="ADMIN_CLAIM_POLICY">
10759                                         <context link="claim_policy" field="org_unit"/>
10760                 </delete>
10761                         </actions>
10762                 </permacrud>
10763         </class>
10764
10765     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
10766         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
10767             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10768             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
10769             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10770             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
10771             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
10772             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
10773             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
10774             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
10775             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
10776             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
10777             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
10778             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
10779             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
10780             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
10781             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10782             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
10783                                                 <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
10784                                                 <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
10785                                                 <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
10786         </fields>
10787         <links>
10788             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
10789             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10790         </links>
10791     </class>
10792
10793     <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">
10794         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
10795             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10796             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10797             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10798             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10799             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10800         </fields>
10801     </class>
10802
10803     <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">
10804         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10805             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10806             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10807             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10808             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10809             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10810             <field reporter:label="City" name="city" reporter:datatype="text"/>
10811             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10812             <field reporter:label="State" name="state" reporter:datatype="text"/>
10813             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10814             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10815             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10816         </fields>
10817     </class>
10818
10819     <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">
10820         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10821             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10822             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10823             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10824             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10825             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10826             <field reporter:label="City" name="city" reporter:datatype="text"/>
10827             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10828             <field reporter:label="State" name="state" reporter:datatype="text"/>
10829             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10830             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10831             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10832         </fields>
10833     </class>
10834
10835     <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">
10836         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
10837             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10838             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10839             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10840             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
10841             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
10842             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10843         </fields>
10844     </class>
10845
10846     <class id="stgs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::setting_stage" oils_persist:tablename="staging.setting_stage" reporter:label="User Setting Stage">
10847         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
10848             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10849             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10850             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10851             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
10852             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
10853             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10854         </fields>
10855     </class>
10856
10857         <class id="afsg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_group" oils_persist:tablename="action.fieldset_group" reporter:label="Fieldset Group">
10858                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
10859                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
10860                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10861                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
10862                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
10863                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
10864                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
10865                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
10866                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
10867                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10868                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10869                 </fields>
10870                 <links>
10871                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10872                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10873                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
10874                 </links>
10875                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10876                         <actions>
10877                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10878                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10879                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10880                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10881                         </actions>
10882                 </permacrud>
10883         </class>
10884
10885         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
10886                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
10887                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
10888                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10889                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10890                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
10891                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
10892                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
10893                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
10894                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
10895                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
10896                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
10897                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
10898                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
10899                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
10900                 </fields>
10901                 <links>
10902                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10903                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10904                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10905                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
10906                 </links>
10907                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10908                         <actions>
10909                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10910                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10911                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10912                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10913                         </actions>
10914                 </permacrud>
10915         </class>
10916
10917         <class id="afscv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
10918                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
10919                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
10920                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
10921                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
10922                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
10923                 </fields>
10924                 <links>
10925                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
10926                 </links>
10927                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
10928                         <actions>
10929                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10930                     <context link="fieldset" field="owning_lib"/>
10931                 </create>
10932                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10933                     <context link="fieldset" field="owning_lib"/>
10934                 </retrieve>
10935                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10936                     <context link="fieldset" field="owning_lib"/>
10937                 </update>
10938                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10939                     <context link="fieldset" field="owning_lib"/>
10940                 </delete>
10941                         </actions>
10942                 </permacrud>
10943         </class>
10944
10945     <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">
10946         <fields>
10947             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10948             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10949             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10950         </fields>
10951                 <links>
10952                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10953                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10954                 </links>
10955     </class>
10956
10957     <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">
10958         <fields>
10959             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10960             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
10961         </fields>
10962                 <links>
10963                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10964                 </links>
10965     </class>
10966
10967     <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">
10968         <fields>
10969             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10970             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10971             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10972         </fields>
10973                 <links>
10974                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10975                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10976                 </links>
10977     </class>
10978
10979     <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">
10980         <fields>
10981             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10982             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
10983         </fields>
10984                 <links>
10985                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10986                 </links>
10987     </class>
10988
10989     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
10990                 <oils_persist:source_definition><![CDATA[
10991
10992             SELECT  DISTINCT l.*
10993               FROM  action.unfulfilled_hold_loops l
10994                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
10995               WHERE l.count = m.max
10996
10997                 ]]></oils_persist:source_definition>
10998         <fields>
10999             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11000             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11001             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11002         </fields>
11003                 <links>
11004                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11005                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11006                 </links>
11007     </class>
11008
11009         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
11010                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
11011                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
11012                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
11013                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
11014                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
11015                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
11016                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
11017                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
11018                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
11019                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
11020                 </fields>
11021                 <links>
11022                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
11023                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
11024                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
11025                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
11026                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
11027                 </links>
11028         </class>
11029
11030         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
11031                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
11032                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
11033                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
11034                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11035                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
11036                 </fields>
11037                 <links>
11038                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
11039                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
11040                 </links>
11041         </class>
11042
11043         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
11044                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
11045                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
11046                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
11047                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
11048                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
11049                 </fields>
11050                 <links>
11051                 </links>
11052         </class>
11053
11054         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
11055                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
11056                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
11057                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
11058                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11059                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
11060                 </fields>
11061                 <links>
11062                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
11063                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
11064                 </links>
11065         </class>
11066         
11067         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
11068                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
11069                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
11070                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
11071                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
11072                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
11073                 </fields>
11074                 <links>
11075                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
11076                 </links>
11077         </class>
11078         
11079         <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">
11080                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
11081                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
11082                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11083                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11084                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
11085                 </fields>
11086                 <links>
11087                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11088                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
11089                 </links>
11090         </class>
11091
11092         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
11093                 <fields oils_persist:primary="name">
11094                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
11095                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
11096                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
11097                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11098                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
11099                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
11100                 </fields>
11101                 <links>
11102                 </links>
11103         </class>
11104
11105         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
11106                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11107                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11108                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
11109                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11110                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11111                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11112                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11113                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11114                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11115                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11116                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11117                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11118                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11119                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11120                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11121                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11122                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11123                 </fields>
11124                 <links>
11125                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11126                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11127                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11128                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11129                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11130                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11131                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11132                 </links>
11133         </class>
11134
11135         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
11136                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
11137                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
11138                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11139                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11140                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
11141                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
11142                 </fields>
11143                 <links>
11144                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11145                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
11146                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
11147                 </links>
11148         </class>
11149
11150         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
11151                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
11152                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
11153                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
11154                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
11155                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
11156                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
11157                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
11158                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11159                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
11160                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11161                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
11162                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
11163                 </fields>
11164                 <links>
11165                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11166                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
11167                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
11168                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
11169                 </links>
11170         </class>
11171
11172         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
11173                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
11174                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
11175                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
11176                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11177                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11178                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
11179                 </fields>
11180                 <links>
11181                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
11182                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
11183                 </links>
11184         </class>
11185
11186         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
11187                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
11188                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
11189                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11190                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11191                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11192                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
11193                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
11194                 </fields>
11195                 <links>
11196                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11197                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11198                 </links>
11199         </class>
11200
11201         <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">
11202                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
11203                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
11204                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11205                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11206                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11207                 </fields>
11208                 <links>
11209                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11210                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11211                 </links>
11212         </class>
11213
11214         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
11215                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11216                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11217                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11218                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11219                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11220                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11221                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11222                 </fields>
11223                 <links>
11224                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11225                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11226                 </links>
11227         </class>
11228
11229         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
11230                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11231                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11232                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11233                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11234                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11235                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11236                 </fields>
11237                 <links>
11238                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11239                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11240                 </links>
11241         </class>
11242
11243         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
11244                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11245                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11246                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11247                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11248                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11249                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11250                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11251                 </fields>
11252                 <links>
11253                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11254                 </links>
11255         </class>
11256
11257         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
11258                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11259                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11260                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11261                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11262                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11263                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11264                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11265                 </fields>
11266                 <links>
11267                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11268                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11269                 </links>
11270         </class>
11271
11272         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
11273                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11274                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11275                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11276                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11277                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11278                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11279                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11280                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11281                 </fields>
11282                 <links>
11283                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11284                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11285                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11286                 </links>
11287         </class>
11288
11289         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
11290                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11291                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11292                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11293                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11294                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11295                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11296                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11297                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11298                 </fields>
11299                 <links>
11300                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11301                 </links>
11302         </class>
11303
11304         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
11305                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11306                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11307                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11308                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11309                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11310                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11311                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11312                 </fields>
11313                 <links>
11314                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11315                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11316                 </links>
11317         </class>
11318
11319         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
11320                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11321                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11322                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11323                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11324                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11325                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11326                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11327                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11328                 </fields>
11329                 <links>
11330                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11331                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11332                 </links>
11333         </class>
11334
11335         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
11336                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11337                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11338                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11339                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11340                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11341                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11342                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11343                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11344                 </fields>
11345                 <links>
11346                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11347                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11348                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11349                 </links>
11350         </class>
11351
11352         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
11353                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11354                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11355                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11356                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11357                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11358                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11359                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11360                 </fields>
11361                 <links>
11362                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11363                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11364                 </links>
11365         </class>
11366
11367         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
11368                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11369                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11370                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11371                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11372                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11373                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11374                 </fields>
11375                 <links>
11376                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11377                 </links>
11378         </class>
11379
11380         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
11381                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11382                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11383                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11384                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11385                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11386                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11387                 </fields>
11388                 <links>
11389                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11390                 </links>
11391         </class>
11392
11393         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
11394                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11395                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11396                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11397                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11398                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11399                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11400                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11401                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11402                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11403                 </fields>
11404                 <links>
11405                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11406                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11407                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11408                 </links>
11409         </class>
11410
11411         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
11412                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11413                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11414                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11415                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11416                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11417                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11418                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11419                 </fields>
11420                 <links>
11421                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11422                 </links>
11423         </class>
11424
11425         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
11426                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11427                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11428                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11429                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11430                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11431                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11432                 </fields>
11433                 <links>
11434                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11435                 </links>
11436         </class>
11437
11438         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
11439                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11440                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11441                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11442                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11443                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11444                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11445                 </fields>
11446                 <links>
11447                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11448                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11449                 </links>
11450         </class>
11451
11452         <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">
11453                 <fields oils_persist:primary="id">
11454                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
11455                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
11456                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
11457                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
11458                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
11459                 </fields>
11460                 <links>
11461                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
11462                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11463                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
11464                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
11465                 </links>
11466         </class>
11467
11468         <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">
11469                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
11470                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11471                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
11472                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11473                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
11474                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11475                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11476                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
11477                 </fields>
11478                 <links/>
11479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11480                         <actions>
11481                                 <retrieve/>
11482                         </actions>
11483                 </permacrud>
11484         </class>
11485
11486         <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">
11487                 <fields oils_persist:primary="ptype_key">
11488                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
11489                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11490                 </fields>
11491                 <links/>
11492                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11493                         <actions>
11494                                 <retrieve/>
11495                         </actions>
11496                 </permacrud>
11497         </class>
11498
11499         <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">
11500                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
11501                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11502                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
11503                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11504                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11505                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11506                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11507                 </fields>
11508                 <links>
11509                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
11510                 </links>
11511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11512                         <actions>
11513                                 <retrieve/>
11514                         </actions>
11515                 </permacrud>
11516         </class>
11517
11518         <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">
11519                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
11520                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11521                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
11522                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
11523                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11524                 </fields>
11525                 <links>
11526                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11527                 </links>
11528                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11529                         <actions>
11530                                 <retrieve/>
11531                         </actions>
11532                 </permacrud>
11533         </class>
11534
11535     <class
11536         id="uvs"
11537         controller="open-ils.cstore open-ils.pcrud"
11538         oils_obj:fieldmapper="url_verify::session"
11539         oils_persist:tablename="url_verify.session"
11540         reporter:label="URL Verification Session"
11541     >
11542         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
11543             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
11544             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11545                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
11546             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
11547             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
11548             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11549             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
11550             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
11551             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
11552         </fields>
11553
11554         <links>
11555             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11556             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11557             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
11558             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
11559             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
11560         </links>
11561
11562         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11563             <actions>
11564                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
11565             </actions>
11566         </permacrud>
11567
11568     </class>
11569
11570     <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">
11571         <oils_persist:source_definition><![CDATA[
11572             SELECT
11573                 cbrebi.id AS id,  -- so we can have a pkey in our view
11574                 uvs.id AS session,
11575                 uvs.owning_lib,
11576                 cbrebi.target_biblio_record_entry
11577             FROM url_verify.session uvs
11578             JOIN container.biblio_record_entry_bucket cbreb
11579                 ON (uvs.container = cbreb.id)
11580             JOIN container.biblio_record_entry_bucket_item cbrebi
11581                 ON (cbrebi.bucket = cbreb.id)
11582         ]]></oils_persist:source_definition>
11583         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
11584             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
11585             <field reporter:label="Session" name="session" reporter:datatype="link" />
11586             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
11587             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
11588         </fields>
11589         <links>
11590             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
11591             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
11592             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
11593         </links>
11594         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11595             <actions>
11596                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
11597             </actions>
11598         </permacrud>
11599     </class>
11600
11601     <class
11602         id="uvus"
11603         controller="open-ils.cstore open-ils.pcrud"
11604         oils_obj:fieldmapper="url_verify::url_selector"
11605         oils_persist:tablename="url_verify.url_selector"
11606         reporter:label="URL Verification URL Selector"
11607     >
11608         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
11609             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
11610             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
11611                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11612             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
11613         </fields>
11614
11615         <links>
11616             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11617             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
11618         </links>
11619
11620         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11621             <actions>
11622                 <create permission="URL_VERIFY">
11623                     <context link="session" field="owning_lib"/>
11624                 </create>
11625                 <retrieve permission="URL_VERIFY">
11626                     <context link="session" field="owning_lib"/>
11627                 </retrieve>
11628                 <update permission="URL_VERIFY">
11629                     <context link="session" field="owning_lib"/>
11630                 </update>
11631                 <delete permission="URL_VERIFY">
11632                     <context link="session" field="owning_lib"/>
11633                 </delete>
11634             </actions>
11635         </permacrud>
11636
11637     </class>
11638
11639     <class
11640         id="uvu"
11641         controller="open-ils.cstore open-ils.pcrud"
11642         oils_obj:fieldmapper="url_verify::url"
11643         oils_persist:tablename="url_verify.url"
11644         reporter:label="URL Verification URL"
11645     >
11646         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
11647             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
11648                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
11649                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
11650                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11651                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
11652             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11653             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11654             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
11655             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
11656             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
11657             <field reporter:label="Host" name="host" reporter:datatype="text"/>
11658             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
11659             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
11660             <field reporter:label="Path" name="path" reporter:datatype="text"/>
11661             <field reporter:label="Page" name="page" reporter:datatype="text"/>
11662             <field reporter:label="Query" name="query" reporter:datatype="text"/>
11663             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
11664             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
11665         </fields>
11666
11667         <links>
11668             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
11669             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
11670             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11671             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
11672             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
11673         </links>
11674
11675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11676             <actions>
11677                 <create permission="URL_VERIFY">
11678                     <context link="session" field="owning_lib"/>
11679                 </create>
11680                 <retrieve permission="URL_VERIFY">
11681                     <context link="session" field="owning_lib"/>
11682                 </retrieve>
11683                 <update permission="URL_VERIFY">
11684                     <context link="session" field="owning_lib"/>
11685                 </update>
11686                 <delete permission="URL_VERIFY">
11687                     <context link="session" field="owning_lib"/>
11688                 </delete>
11689             </actions>
11690         </permacrud>
11691
11692     </class>
11693
11694     <class
11695         id="uvva"
11696         controller="open-ils.cstore open-ils.pcrud"
11697         oils_obj:fieldmapper="url_verify::verification_attempt"
11698         oils_persist:tablename="url_verify.verification_attempt"
11699         reporter:label="URL Verification Attempt"
11700     >
11701         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
11702             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
11703                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
11704                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
11705             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
11706             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
11707         </fields>
11708
11709         <links>
11710             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11711             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11712         </links>
11713
11714         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11715             <actions>
11716                 <create permission="URL_VERIFY">
11717                     <context link="session" field="owning_lib"/>
11718                 </create>
11719                 <retrieve permission="URL_VERIFY">
11720                     <context link="session" field="owning_lib"/>
11721                 </retrieve>
11722                 <update permission="URL_VERIFY">
11723                     <context link="session" field="owning_lib"/>
11724                 </update>
11725                 <delete permission="URL_VERIFY">
11726                     <context link="session" field="owning_lib"/>
11727                 </delete>
11728             </actions>
11729         </permacrud>
11730
11731     </class>
11732
11733     <class
11734         id="uvuv"
11735         controller="open-ils.cstore open-ils.pcrud"
11736         oils_obj:fieldmapper="url_verify::url_verification"
11737         oils_persist:tablename="url_verify.url_verification"
11738         reporter:label="URL Verification"
11739     >
11740         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
11741             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
11742                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
11743                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
11744             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
11745             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
11746             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
11747             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
11748                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
11749         </fields>
11750
11751         <links>
11752             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
11753             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
11754             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
11755         </links>
11756
11757         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11758             <actions>
11759                 <create permission="URL_VERIFY">
11760                     <context link="attempt" jump="session" field="owning_lib"/>
11761                 </create>
11762                 <retrieve permission="URL_VERIFY">
11763                     <context link="attempt" jump="session" field="owning_lib"/>
11764                 </retrieve>
11765                 <update permission="URL_VERIFY">
11766                     <context link="attempt" jump="session" field="owning_lib"/>
11767                 </update>
11768                 <delete permission="URL_VERIFY">
11769                     <context link="attempt" jump="session" field="owning_lib"/>
11770                 </delete>
11771             </actions>
11772         </permacrud>
11773
11774     </class>
11775
11776         <class
11777                 id="cfdi"
11778                 controller="open-ils.cstore open-ils.pcrud"
11779                 oils_obj:fieldmapper="config::filter_dialog_interface"
11780                 oils_persist:tablename="config.filter_dialog_interface"
11781                 reporter:label="FilterDialog Interface">
11782                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
11783                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
11784                         <field reporter:label="Description" name="description" reporter:datatype="text" />
11785                 </fields>
11786                 <links>
11787                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
11788                 </links>
11789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11790                         <actions>
11791                                 <retrieve />
11792                         </actions>
11793                 </permacrud>
11794         </class>
11795
11796         <class
11797                 id="cfdfs"
11798                 controller="open-ils.cstore open-ils.pcrud"
11799                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
11800                 oils_persist:tablename="config.filter_dialog_filter_set"
11801                 reporter:label="FilterDialog Filter Set">
11802                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
11803                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11804                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11805                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11806                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11807                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
11808                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11809                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
11810                 </fields>
11811                 <links>
11812                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11813                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11814                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
11815                 </links>
11816                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11817                         <actions>
11818                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11819                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11820                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11821                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11822                         </actions>
11823                 </permacrud>
11824
11825         </class>
11826
11827         <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">
11828                 <fields oils_persist:primary="code">
11829                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
11830                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
11831                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
11832                 </fields>
11833                 <links/>
11834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11835                         <actions>
11836                                 <retrieve/>
11837                         </actions>
11838                 </permacrud>
11839         </class>
11840
11841         <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">
11842                 <oils_persist:source_definition><![CDATA[
11843
11844             SELECT  b.id,
11845                     MAX(dcp.edit_date) AS last_delete_date
11846              FROM   biblio.record_entry b
11847                     JOIN asset.call_number cn ON (cn.record = b.id)
11848                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
11849              WHERE  NOT b.deleted
11850              GROUP BY b.id
11851              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
11852
11853                 ]]></oils_persist:source_definition>
11854                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11855                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11856                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
11857                 </fields>
11858                 <links>
11859                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11860                 </links>
11861                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11862                         <actions>
11863                                 <retrieve/>
11864                         </actions>
11865                 </permacrud>
11866         </class>
11867
11868         <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">
11869                 <oils_persist:source_definition><![CDATA[
11870
11871             -- -- 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.
11872             -- -- 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
11873             -- -- may not.
11874             -- SELECT
11875             --     bre.id AS bib_id,
11876             --     COALESCE( z.copy_count, 0 ) AS copy_count,
11877             --     COALESCE( z.hold_count, 0 ) AS hold_count,
11878             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
11879             -- FROM (
11880                 SELECT
11881                     y.bre AS id,
11882                     COALESCE( x.copy_count, 0 ) AS copy_count,
11883                     y.hold_count AS hold_count,
11884                     (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
11885                 FROM (
11886                         SELECT
11887                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
11888                             COUNT(*) AS hold_count
11889                         FROM action.hold_request h
11890                         WHERE
11891                             cancel_time IS NULL
11892                             AND fulfillment_time IS NULL
11893                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
11894                         GROUP BY 1
11895                     )y LEFT JOIN (
11896                         SELECT 
11897                             (SELECT id
11898                                 FROM biblio.record_entry 
11899                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
11900                             ) AS bre, 
11901                             COUNT(*) AS copy_count
11902                         FROM asset.copy
11903                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
11904                         WHERE copy.holdable 
11905                             AND NOT copy.deleted 
11906                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
11907                         GROUP BY 1
11908                     )x ON x.bre = y.bre
11909                 -- )z RIGHT JOIN (
11910                 --     SELECT id
11911                 --     FROM biblio.record_entry
11912                 --     WHERE NOT deleted
11913                 -- )bre ON (z.bib_id = bre.id)
11914                 
11915
11916                 ]]></oils_persist:source_definition>
11917                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11918                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11919                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
11920                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
11921                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
11922                 </fields>
11923                 <links>
11924                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11925                 </links>
11926                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11927                         <actions>
11928                                 <retrieve/>
11929                         </actions>
11930                 </permacrud>
11931         </class>
11932
11933         <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">
11934                 <oils_persist:source_definition><![CDATA[
11935             SELECT *,
11936                 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,
11937                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
11938             FROM
11939                 (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
11940                     FROM
11941                         action.hold_request ahr
11942                         JOIN reporter.hold_request_record rhrr USING (id)
11943                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11944                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
11945                     WHERE
11946                         ahr.cancel_time IS NULL
11947                         AND ahr.fulfillment_time IS NULL
11948                     GROUP BY bib_record, pickup_lib
11949                 )x
11950                 JOIN
11951                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11952                     FROM
11953                         action.hold_request ahr
11954                         JOIN reporter.hold_request_record rhrr USING (id)
11955                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11956                     WHERE
11957                         ahr.cancel_time IS NULL
11958                         AND ahr.fulfillment_time IS NULL
11959                     GROUP BY bib_record
11960                 )y
11961                 USING (id)
11962                 ]]></oils_persist:source_definition>
11963                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11964                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11965                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
11966                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
11967                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
11968                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11969                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11970                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
11971                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11972                 </fields>
11973                 <links>
11974                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11975                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
11976                 </links>
11977                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11978                         <actions>
11979                                 <retrieve/>
11980                         </actions>
11981                 </permacrud>
11982         </class>
11983
11984         <class id="rhcrpbapd" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib_and_pickup_desc" oils_persist:readonly="true" reporter:label="Hold/Copy Ratio per Bib and Pickup Library (and Descendants) ">
11985                 <oils_persist:source_definition><![CDATA[
11986             WITH counts_at_ou AS (
11987                 SELECT  rhrr.bib_record AS id,
11988                         aou.id AS pickup_lib_or_desc,
11989                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
11990                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
11991                   FROM  actor.org_unit aou
11992                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
11993                         action.hold_request ahr
11994                         JOIN reporter.hold_request_record rhrr USING (id)
11995                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11996                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
11997                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
11998                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
11999                         AND (actor.org_unit_ancestor_at_depth(ahr.pickup_lib,aout.depth)).id = (actor.org_unit_ancestor_at_depth(ac.circ_lib,aout.depth)).id
12000                   GROUP BY 1, 2
12001             )
12002             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
12003                    y.holds_everywhere, y.copy_count_everywhere,
12004                 CASE WHEN copy_count_at_or_below = 0 THEN 'Infinity'::FLOAT ELSE x.holds_at_or_below::FLOAT/x.copy_count_at_or_below END AS hold_copy_ratio_at_or_below_ou,
12005                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
12006             FROM counts_at_ou x
12007                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12008                     FROM
12009                         action.hold_request ahr
12010                         JOIN reporter.hold_request_record rhrr USING (id)
12011                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12012                     WHERE
12013                         ahr.cancel_time IS NULL
12014                         AND ahr.fulfillment_time IS NULL
12015                     GROUP BY bib_record
12016                 )y
12017                 USING (id)
12018                 ]]></oils_persist:source_definition>
12019                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12020                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12021                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
12022                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
12023                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
12024                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12025                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12026                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
12027                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12028                 </fields>
12029                 <links>
12030                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12031                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
12032                 </links>
12033                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12034                         <actions>
12035                                 <retrieve/>
12036                         </actions>
12037                 </permacrud>
12038         </class>
12039
12040         <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">
12041                 <oils_persist:source_definition><![CDATA[
12042             SELECT
12043                 ac.id,
12044                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
12045                 MAX(actac.xact_start) AS last_circ
12046             FROM asset.copy ac
12047                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12048             GROUP BY ac.id
12049
12050             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
12051             --SELECT
12052             --    ac.id,
12053             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
12054             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
12055             --FROM asset.copy ac
12056             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12057             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
12058             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
12059                 ]]></oils_persist:source_definition>
12060                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12061                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
12062                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
12063                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
12064                 </fields>
12065                 <links>
12066                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12067                 </links>
12068                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12069                         <actions>
12070                                 <retrieve/>
12071                         </actions>
12072                 </permacrud>
12073         </class>
12074
12075         <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">
12076                 <fields oils_persist:primary="id">
12077                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
12078                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
12079                 </fields>
12080                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12081                         <actions>
12082                                 <retrieve/>
12083                         </actions>
12084                 </permacrud>
12085         </class>
12086
12087         <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">
12088                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
12089                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12090                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
12091                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12092                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12093                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12094                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12095                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12096                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
12097                 </fields>
12098                 <links>
12099                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
12100                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12101                 </links>
12102                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12103                         <actions>
12104                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12105                                 <retrieve/>
12106                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12107                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12108                         </actions>
12109                 </permacrud>
12110         </class>
12111
12112         <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">
12113                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
12114                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12115                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
12116                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12117                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12118                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12119                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12120                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12121                 </fields>
12122                 <links>
12123                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
12124                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12125                 </links>
12126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12127                         <actions>
12128                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12129                                 <retrieve/>
12130                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12131                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12132                         </actions>
12133                 </permacrud>
12134         </class>
12135
12136
12137         <!-- ********************************************************************************************************************* -->
12138         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
12139         <!-- ********************************************************************************************************************* -->
12140         <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">
12141                 <fields oils_persist:primary="id">
12142                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
12143                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
12144                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
12145                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12146                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
12147                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
12148                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12149                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
12150                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
12151                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
12152                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
12153                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
12154                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
12155                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
12156                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12157                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
12158                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
12159                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
12160                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
12161                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
12162                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
12163                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
12164                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
12165                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
12166                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
12167                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
12168                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
12169                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
12170                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
12171                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12172                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12173                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12174                 </fields>
12175                 <links>
12176                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12177                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
12178                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
12179                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
12180                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
12181                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
12182                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
12183                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
12184                 </links>
12185         </class>
12186
12187         <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">
12188                 <fields oils_persist:primary="id">
12189                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12190                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12191                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12192                 </fields>
12193                 <links>
12194                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12195                 </links>
12196         </class>
12197
12198         <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">
12199                 <fields oils_persist:primary="id">
12200                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12201                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12202                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12203                 </fields>
12204                 <links>
12205                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12206                 </links>
12207         </class>
12208
12209         <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">
12210                 <fields oils_persist:primary="id">
12211                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
12212
12213                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
12214                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
12215                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
12216
12217                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
12218                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
12219                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
12220
12221                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
12222                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
12223
12224                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12225                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
12226                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
12227
12228                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
12229                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
12230
12231                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
12232                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
12233                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
12234
12235                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
12236                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
12237                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
12238
12239                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12240                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
12241                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
12242                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
12243
12244                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
12245                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
12246
12247                 </fields>
12248                 <links>
12249                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
12250                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12251                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
12252                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
12253                 </links>
12254         </class>
12255
12256         <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">
12257                 <oils_persist:source_definition><![CDATA[
12258
12259             SELECT
12260                 po.ordering_agency AS ordering_agency,
12261                 po.id AS purchase_order,
12262                 li.id AS lineitem,
12263                 lid.id AS lineitem_detail,
12264                 cpa.id AS claim_policy_action
12265             FROM
12266                 acq.lineitem_detail lid
12267                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
12268                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
12269                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
12270                 JOIN acq.claim_policy_action cpa ON (
12271                     cpa.claim_policy = cp.id
12272
12273                     -- we only care about claim policy actions whose claim
12274                     -- interval we'd reached or exceeded
12275                     AND (NOW() - cpa.action_interval) > po.order_date
12276
12277                     -- filter out all claim policy actions where claim events
12278                     -- have occurred on or after the action's action_interval
12279                     AND NOT EXISTS (
12280                         SELECT 1
12281                         FROM
12282                             acq.claim_event evt
12283                             JOIN acq.claim claim ON (
12284                                 claim.id = evt.claim
12285                                 AND claim.lineitem_detail = lid.id
12286                             )
12287                         WHERE
12288                             evt.event_date >= (po.order_date + cpa.action_interval)
12289                     )
12290                 )
12291             WHERE
12292                 lid.cancel_reason IS NULL
12293                 AND li.cancel_reason IS NULL -- belt/suspenders
12294                 AND po.cancel_reason IS NULL -- belt/suspenders
12295                 AND lid.recv_time IS NULL
12296                 AND po.state = 'on-order'
12297             ORDER BY 1, 2, 3, 4, 5
12298
12299                 ]]></oils_persist:source_definition>
12300                 <fields>
12301                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
12302                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
12303                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12304                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
12305                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
12306                 </fields>
12307                 <links>
12308                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
12309                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
12310                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12311                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
12312                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
12313                 </links>
12314         </class>
12315         <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">
12316                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12317                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12318                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12319                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12320                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12321                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12322                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12323                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12324                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12325                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12326                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12327                 </fields>
12328                 <links>
12329                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12330                 </links>
12331     </class>
12332         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
12333                 <oils_persist:source_definition><![CDATA[
12334             SELECT * FROM acq.lineitem_summary 
12335                                 WHERE item_count > (invoice_count + cancel_count)
12336         ]]></oils_persist:source_definition>
12337                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12338                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12339                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12340                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12341                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12342                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12343                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12344                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12345                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12346                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12347                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12348                 </fields>
12349                 <links>
12350                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12351                 </links>
12352     </class>
12353         <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">
12354                 <oils_persist:source_definition><![CDATA[
12355
12356                         SELECT  t.*
12357                           FROM  action.transit_copy t
12358                                 JOIN actor.org_unit AS s ON (t.source = s.id)
12359                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
12360                           WHERE s.parent_ou <> d.parent_ou
12361
12362                 ]]></oils_persist:source_definition>
12363                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
12364                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
12365                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
12366                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
12367                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
12368                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
12369                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
12370                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
12371                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
12372                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
12373                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
12374                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
12375                 </fields>
12376                 <links>
12377                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
12378                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
12379                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
12380                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
12381                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12382                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
12383                 </links>
12384         </class>
12385
12386     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
12387                 <oils_persist:source_definition><![CDATA[
12388
12389         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
12390                 SELECT
12391                         cp.id as copy,
12392                         COUNT(circ.id),
12393                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12394                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12395                 FROM
12396                         asset.copy cp
12397                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
12398                 GROUP BY 1, 3, 4
12399                 UNION ALL
12400                 SELECT
12401                         cp.id as copy,
12402                         COUNT(circ.id),
12403                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12404                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12405                 FROM
12406                         asset.copy cp
12407                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
12408                 GROUP BY 1, 3, 4
12409                 UNION ALL
12410                 SELECT
12411                         id as copy,
12412                         circ_count,
12413                         -1 AS year,
12414                         false as is_renewal
12415                 FROM
12416                         extend_reporter.legacy_circ_count
12417         )x GROUP BY 1, 3, 4
12418
12419                 ]]></oils_persist:source_definition>
12420         <fields>
12421             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
12422             <field reporter:label="Count" name="count" reporter:datatype="int"/>
12423             <field reporter:label="Year" name="year" reporter:datatype="int"/>
12424             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
12425         </fields>
12426                 <links>
12427                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12428                 </links>
12429                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12430                         <actions>
12431                                 <retrieve/>
12432                         </actions>
12433                 </permacrud>
12434     </class>
12435
12436         <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">
12437                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
12438                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
12439                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
12440                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
12441                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
12442                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
12443                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
12444                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
12445                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
12446                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
12447                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
12448                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
12449                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
12450                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
12451                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
12452                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
12453                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
12454                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
12455                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
12456                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
12457                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
12458                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
12459                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
12460                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
12461                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
12462                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
12463                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
12464                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
12465                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
12466                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
12467                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
12468                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
12469                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
12470                 </fields>
12471                 <links>
12472                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
12473                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
12474                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
12475                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12476                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
12477                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12478                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12479                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
12480                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
12481                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
12482                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
12483                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
12484                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
12485                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
12486                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
12487                 </links>
12488         </class>
12489
12490     <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">
12491         <fields oils_persist:primary="id">
12492             <field reporter:label="Title" name="title" reporter:datatype="text"/>
12493             <field reporter:label="Author" name="author" reporter:datatype="text"/>
12494             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
12495             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12496             <field reporter:label="Price" name="price" reporter:datatype="money"/>
12497             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
12498             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
12499             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
12500             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12501             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
12502             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12503             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
12504             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
12505             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
12506             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12507             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12508             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
12509             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
12510             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
12511             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
12512             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
12513             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
12514             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12515             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
12516             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
12517             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
12518             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
12519             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
12520             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
12521             <field reporter:label="Status" name="status" reporter:datatype="link"/>
12522             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
12523             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
12524             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
12525             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
12526         </fields>
12527         <links>
12528             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12529             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12530             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12531             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12532             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
12533             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
12534             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
12535             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
12536         </links>
12537     </class>
12538
12539     <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">
12540         <fields oils_persist:primary="id">
12541             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12542             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12543             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12544             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12545         </fields>
12546         <links>
12547             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12548             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12549         </links>
12550     </class>
12551
12552     <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">
12553         <fields oils_persist:primary="owning_lib">
12554             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12555             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12556             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12557         </fields>
12558         <links>
12559             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12560         </links>
12561     </class>
12562
12563     <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">
12564         <fields oils_persist:primary="id">
12565             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12566             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12567             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12568             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12569             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12570         </fields>
12571         <links>
12572             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12573             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12574             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12575         </links>
12576     </class>
12577
12578     <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">
12579         <fields oils_persist:primary="circ_lib">
12580             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12581             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12582             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12583             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12584         </fields>
12585         <links>
12586             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12587             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12588         </links>
12589     </class>
12590
12591     <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">
12592         <fields oils_persist:primary="id">
12593             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12594             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12595             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12596             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12597             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12598         </fields>
12599         <links>
12600             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12601             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12602             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12603         </links>
12604     </class>
12605
12606     <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">
12607         <fields oils_persist:primary="home_ou">
12608             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12609             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12610             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12611             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12612         </fields>
12613         <links>
12614             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12615             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12616         </links>
12617     </class>
12618         <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">
12619                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
12620                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
12621                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
12622                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
12623                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
12624                 </fields>
12625                 <links>
12626                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12627                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
12628                 </links>
12629                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12630                         <actions>
12631                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12632                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
12633                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12634                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12635                         </actions>
12636                 </permacrud>
12637         </class>
12638         <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">
12639                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
12640                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
12641                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
12642                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
12643                 </fields>
12644                 <links>
12645                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
12646                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
12647                         </links>
12648                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12649                 <actions>
12650                                 <create permission="ADMIN_ACQ_FUND_TAG">
12651                                         <context link="tag" field="owner"/>
12652                                 </create>
12653                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
12654                                         <context link="tag" field="owner"/>
12655                                 </retrieve>
12656                                 <update permission="ADMIN_ACQ_FUND_TAG">
12657                                         <context link="tag" field="owner"/>
12658                                 </update>
12659                                 <delete permission="ADMIN_ACQ_FUND_TAG">
12660                                         <context link="tag" field="owner"/>
12661                                 </delete>
12662                         </actions>
12663                 </permacrud>
12664         </class>
12665         <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">
12666                 <oils_persist:source_definition><![CDATA[
12667                 SELECT
12668                         poi.purchase_order AS purchase_order,
12669                         ii.invoice AS invoice,
12670                         NULL AS lineitem,
12671                         poi.id AS po_item,
12672                         NULL AS picklist
12673                 FROM
12674                         acq.po_item poi
12675                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
12676                 UNION SELECT
12677                         jub.purchase_order AS purchase_order,
12678                         ie.invoice AS invoice,
12679                         jub.id AS lineitem,
12680                         NULL AS po_item,
12681                         jub.picklist AS picklist
12682                 FROM
12683                         acq.lineitem jub
12684                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
12685                 UNION SELECT
12686                         ii.purchase_order AS purchase_order,
12687                         ii.invoice AS invoice,
12688                         NULL AS lineitem,
12689                         NULL AS po_item,
12690                         NULL AS picklist
12691                 FROM
12692                         acq.invoice_item ii
12693                 WHERE ii.po_item IS NULL
12694                 UNION SELECT
12695                         ie.purchase_order AS purchase_order,
12696                         ie.invoice AS invoice,
12697                         NULL AS lineitem,
12698                         NULL AS po_item,
12699                         NULL AS picklist
12700                 FROM
12701                         acq.invoice_entry ie
12702                 WHERE ie.lineitem IS NULL
12703                 UNION SELECT
12704                         NULL AS purchase_order,
12705                         NULL AS invoice,
12706                         jub.id AS lineitem,
12707                         NULL AS po_item,
12708                         jub.picklist AS picklist
12709                 FROM
12710                         acq.lineitem jub
12711                 WHERE jub.purchase_order IS NULL
12712                 ]]></oils_persist:source_definition>
12713                 <fields>
12714                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
12715                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
12716                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
12717                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
12718                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
12719                 </fields>
12720                 <links>
12721                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
12722                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
12723                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
12724                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
12725                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
12726                 </links>
12727         </class>
12728         <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">
12729                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
12730                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12731                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12732                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
12733                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
12734                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
12735                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12736                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
12737                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
12738                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
12739                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
12740                 </fields>
12741                 <links>
12742                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
12743                 </links>
12744                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12745                         <actions>
12746                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12747                                 <retrieve/>
12748                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12749                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12750                         </actions>
12751                 </permacrud>
12752         </class>
12753
12754         <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">
12755                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
12756                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12757                         <field name="date_applied" reporter:datatype="timestamp"/>
12758                         <field name="org" reporter:datatype="org_unit"/>
12759                         <field name="original_value" reporter:datatype="text"/>
12760                         <field name="new_value" reporter:datatype="text"/>
12761                         <field name="field_name" reporter:datatype="link"/>
12762                 </fields>
12763                 <links>
12764                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
12765                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
12766                 </links>
12767                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12768                         <actions>
12769                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
12770                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
12771                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12772                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12773                         </actions>
12774                 </permacrud>
12775         </class>
12776         <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">
12777                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12778                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12779                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12780                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12781                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12782                 </fields>
12783                 <links>
12784                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12785                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
12786                 </links>
12787         </class>
12788         <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">
12789                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12790                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12791                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12792                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12793                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12794                 </fields>
12795                 <links>
12796                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12797                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
12798                 </links>
12799         </class>
12800         <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">
12801                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
12802                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
12803                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
12804                         <field reporter:label="Manual" name="manual" reporter:datatype="bool" oils_obj:required="true"/>
12805                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
12806                 </fields>
12807                 <links>
12808                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
12809                 </links>
12810                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12811                         <actions>
12812                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12813                                 <retrieve/>
12814                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12815                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12816                         </actions>
12817                 </permacrud>
12818         </class>
12819         <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">
12820                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
12821                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12822                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link" oils_obj:required="true"/>
12823                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" oils_obj:required="true"/>
12824                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int" oils_obj:required="true"/>
12825                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
12826                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool" oils_obj:required="true"/>
12827                 </fields>
12828                 <links>
12829                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
12830                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
12831                 </links>
12832                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12833                         <actions>
12834                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12835                                 <retrieve/>
12836                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12837                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12838                         </actions>
12839                 </permacrud>
12840         </class>
12841         <class id="cctt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_tag_type" oils_persist:tablename="config.copy_tag_type" reporter:label="Copy Tag Types" oils_persist:field_safe="true">
12842                 <fields oils_persist:primary="code">
12843                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
12844                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
12845                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12846                 </fields>
12847                 <links>
12848                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12849                 </links>
12850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12851                         <actions>
12852                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12853                                 <retrieve/>
12854                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12855                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12856                         </actions>
12857                 </permacrud>
12858         </class>
12859         <class id="acpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_tag" oils_persist:tablename="asset.copy_tag" reporter:label="Copy Tags" oils_persist:field_safe="true">
12860                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
12861                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12862                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
12863                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12864                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12865                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
12866                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
12867                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12868                         <field reporter:label="URL" name="url" reporter:datatype="text"/>
12869                 </fields>
12870                 <links>
12871                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
12872                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12873                 </links>
12874                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12875                         <actions>
12876                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
12877                                 <retrieve/>
12878                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
12879                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
12880                         </actions>
12881                 </permacrud>
12882         </class>
12883         <class id="acptcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_tag_copy_map" oils_persist:tablename="asset.copy_tag_copy_map" reporter:label="Copy Tag Copy Map" oils_persist:field_safe="true">
12884                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
12885                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12886                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
12887                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
12888                 </fields>
12889                 <links>
12890                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12891                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
12892                 </links>
12893                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12894                         <actions>
12895                                 <create permission="UPDATE_COPY">
12896                     <context link="copy" field="circ_lib"/>
12897                 </create>
12898                                 <retrieve/>
12899                                 <update permission="UPDATE_COPY">
12900                     <context link="copy" field="circ_lib"/>
12901                 </update>
12902                                 <delete permission="UPDATE_COPY">
12903                     <context link="copy" field="circ_lib"/>
12904                 </delete>
12905                         </actions>
12906                 </permacrud>
12907         </class>
12908         <class id="hasholdscount" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::has_holds_count" reporter:label="Copy Has Holds Count" oils_persist:readonly="true">
12909         <oils_persist:source_definition><![CDATA[
12910         SELECT ahcm.target_copy AS id,count(*) AS count
12911          FROM
12912          action.hold_request ahr,
12913          action.hold_copy_map ahcm
12914          WHERE
12915          ahr.cancel_time IS NULL AND
12916          ahr.fulfillment_time IS NULL AND
12917          ahr.capture_time IS NULL AND
12918          ahr.id = ahcm.hold
12919          GROUP BY ahcm.target_copy
12920         ]]></oils_persist:source_definition>
12921         <fields oils_persist:primary="id">
12922             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12923             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
12924         </fields>
12925         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12926             <actions>
12927                <retrieve/>
12928             </actions>
12929         </permacrud>
12930         </class>
12931
12932         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
12933                 oils_obj:fieldmapper="config::workstation_setting_type" 
12934                 oils_persist:tablename="config.workstation_setting_type" 
12935                 reporter:label="Workstation Setting Type">
12936                 <fields oils_persist:primary="name">
12937                         <field name="name" reporter:datatype="text"/>
12938                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
12939                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
12940                         <field name="datatype" reporter:datatype="text"/>
12941                         <field name="fm_class" reporter:datatype="text"/>
12942                         <field name="grp" reporter:datatype="link"/>
12943                 </fields>
12944                 <links>
12945                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
12946                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
12947                 </links>
12948                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12949                         <actions>
12950                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12951                                 <retrieve/>
12952                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12953                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12954                         </actions>
12955                 </permacrud>
12956         </class>
12957
12958         <!-- no pcrud access is granted for now, because it's assumed these
12959                          setting values will be applied and retrived via the API. -->
12960         <class id="awss" 
12961                 controller="open-ils.cstore"
12962                 oils_obj:fieldmapper="actor::workstation_setting" 
12963                 oils_persist:tablename="actor.workstation_setting" 
12964                 reporter:label="Workstation Setting">
12965                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
12966                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
12967                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
12968                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12969                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
12970                 </fields>
12971                 <links>
12972                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
12973                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
12974                 </links>
12975         </class>
12976
12977         <class id="cht" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_type" oils_persist:tablename="config.hold_type" reporter:label="Hold Type" oils_persist:readonly="true">
12978         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_type_id_seq">
12979                 <field name="id" reporter:selector="name" reporter:datatype="id"/>
12980                 <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
12981                 <field name="hold_type"  reporter:datatype="text" oils_persist:i18n="true"/>
12982         </fields>
12983         </class>
12984
12985         <class id="cpt" controller="open-ils.cstore open-ils.pcrud"
12986                 oils_obj:fieldmapper="config::print_template" 
12987                 oils_persist:tablename="config.print_template" 
12988                 reporter:label="Print Templates">
12989                 <fields oils_persist:primary="id" oils_persist:sequence="config.print_template_id_seq">
12990                         <field name="id" reporter:datatype="id"  reporter:selector="label"/>
12991                         <field name="name" reporter:datatype="text" oils_obj:required="true"/>
12992                         <field name="label" reporter:datatype="text" oils_obj:required="true" oils_persist:i18n="true"/>
12993                         <field reporter:label="Owner" name="owner" oils_obj:required="true" reporter:datatype="link"/>
12994                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12995                         <field reporter:label="Locale" name="locale" reporter:datatype="link"/>
12996                         <field name="content_type" reporter:datatype="text"/>
12997                         <field name="template" reporter:datatype="text" oils_obj:required="true"/>
12998                 </fields>
12999                 <links>
13000                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13001                         <link field="locale" reltype="has_a" key="id" map="" class="i18n_l"/>
13002                 </links>
13003                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13004                         <actions>
13005                                 <create permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13006                                 <retrieve permission="STAFF_LOGIN" context_field="owner"/>
13007                                 <update permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13008                                 <delete permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13009                         </actions>
13010                 </permacrud>
13011         </class>
13012
13013         <class id="cct" 
13014                 controller="open-ils.cstore open-ils.pcrud"
13015                 oils_obj:fieldmapper="config::carousel_type" 
13016                 oils_persist:tablename="config.carousel_type" 
13017                 reporter:label="Carousel Types">
13018                 <fields oils_persist:primary="id" oils_persist:sequence="config.carousel_type_id_seq">
13019                         <field reporter:label="Carousel Type ID" reporter:selector="name" name="id" reporter:datatype="id" />
13020                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13021                         <field reporter:label="Automatically Managed?" name="automatic" reporter:datatype="bool"/>
13022                         <field reporter:label="Filter By Age?" name="filter_by_age" reporter:datatype="bool"/>
13023                         <field reporter:label="Filter By Item Owning Library?" name="filter_by_copy_owning_lib" reporter:datatype="bool"/>
13024                         <field reporter:label="Filter By Item Location?" name="filter_by_copy_location" reporter:datatype="bool"/>
13025                 </fields>
13026                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13027                         <actions>
13028                                 <create permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13029                                 <retrieve/>
13030                                 <update permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13031                                 <delete permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13032                         </actions>
13033                 </permacrud>
13034         </class>
13035
13036         <class id="cc" 
13037                 controller="open-ils.cstore open-ils.pcrud"
13038                 oils_obj:fieldmapper="container::carousel" 
13039                 oils_persist:tablename="container.carousel" 
13040                 reporter:label="Carousels">
13041                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_id_seq">
13042                         <field reporter:label="Carousel ID" name="id" reporter:datatype="id" reporter:selector="name"/>
13043                         <field reporter:label="Carousel Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
13044                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13045                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13046                         <field reporter:label="Bucket" name="bucket" reporter:datatype="link"/>
13047                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
13048                         <field reporter:label="Editing User" name="editor" reporter:datatype="link"/>
13049                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
13050                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
13051                         <field reporter:label="Age Limit" name="age_filter"  reporter:datatype="interval"/>
13052                         <field reporter:label="Item Libraries" name="owning_lib_filter" reporter:datatype="text" />      <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
13053                         <field reporter:label="Shelving Locations" name="copy_location_filter" reporter:datatype="text" /> <!-- ditto -->
13054                         <field reporter:label="Last Refresh Time" name="last_refresh_time" reporter:datatype="timestamp"/>
13055                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
13056                         <field reporter:label="Maximum Items" name="max_items" reporter:datatype="int" oils_obj:required="true"/>
13057                 </fields>
13058                 <links>
13059                         <link field="type" reltype="has_a" key="id" map="" class="cct"/>
13060                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13061                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
13062                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
13063                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
13064                 </links>
13065                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13066                         <actions>
13067                                 <create permission="ADMIN_CAROUSEL" context_field="owner"/>
13068                                 <retrieve permission="ADMIN_CAROUSEL" context_field="owner"/>
13069                                 <update permission="ADMIN_CAROUSEL" context_field="owner"/>
13070                                 <delete permission="ADMIN_CAROUSEL" context_field="owner"/>
13071                         </actions>
13072                 </permacrud>
13073         </class>
13074
13075         <class id="ccou" 
13076                 controller="open-ils.cstore open-ils.pcrud"
13077                 oils_obj:fieldmapper="container::carousel_org_unit" 
13078                 oils_persist:tablename="container.carousel_org_unit" 
13079                 reporter:label="Carousels Visible at Library">
13080                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_org_unit_id_seq">
13081                         <field reporter:label="ID" name="id" reporter:datatype="id" />
13082                         <field reporter:label="Carousel" name="carousel" reporter:datatype="link"/>
13083                         <field reporter:label="Override Name" name="override_name" reporter:datatype="text"/>
13084                         <field reporter:label="Library" name="org_unit" reporter:datatype="link"/>
13085                         <field reporter:label="Sequence Number" name="seq" reporter:datatype="int"/>
13086                 </fields>
13087                 <links>
13088                         <link field="carousel" reltype="has_a" key="id" map="" class="cc"/>
13089                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13090                 </links>
13091                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13092                         <actions>
13093                                 <create permission="ADMIN_CAROUSEL">
13094                                     <context link="carousel" field="owner" />
13095                                 </create>
13096                                 <retrieve permission="ADMIN_CAROUSEL">
13097                                     <context link="carousel" field="owner" />
13098                                 </retrieve>
13099                                 <update permission="ADMIN_CAROUSEL">
13100                                     <context link="carousel" field="owner" />
13101                                 </update>
13102                                 <delete permission="ADMIN_CAROUSEL">
13103                                     <context link="carousel" field="owner" />
13104                                 </delete>
13105                         </actions>
13106                 </permacrud>
13107         </class>
13108
13109         <class id="cra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remoteauth_profile" oils_persist:tablename="config.remoteauth_profile" reporter:label="Remote Patron Authentication Configuration Profile">
13110                 <fields oils_persist:primary="name">
13111                         <field name="name"              reporter:datatype="text"     reporter:label="Name" oils_obj:required="true"/>
13112                         <field name="description"       reporter:datatype="text"     reporter:label="Description"/>
13113                         <field name="context_org"       reporter:datatype="org_unit" reporter:label="Context Org" oils_obj:required="true"/>
13114                         <field name="enabled"           reporter:datatype="bool"     reporter:label="Enabled"/>
13115                         <field name="perm"              reporter:datatype="link"     reporter:label="Permission Required by User" oils_obj:required="true"/>
13116                         <field name="restrict_to_org"   reporter:datatype="bool"     reporter:label="Restrict by Home Library"/>
13117                         <field name="allow_inactive"    reporter:datatype="bool"     reporter:label="Allow Inactive Users"/>
13118                         <field name="allow_expired"     reporter:datatype="bool"     reporter:label="Allow Expired Users"/>
13119                         <field name="block_list"        reporter:datatype="text"     reporter:label="Block List"/>
13120                         <field name="usr_activity_type" reporter:datatype="link"     reporter:label="User Activity Type"/>
13121                 </fields>
13122                 <links>
13123                         <link field="context_org" reltype="has_a" key="id" map="" class="aou"/>
13124                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
13125                         <link field="usr_activity_type" reltype="has_a" key="id" map="" class="cuat"/>
13126                 </links>
13127                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13128                         <actions>
13129                                 <create permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13130                                 <retrieve permission="STAFF_LOGIN" context_field="context_org"/>
13131                                 <update permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13132                                 <delete permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13133                         </actions>
13134                 </permacrud>
13135         </class>
13136
13137         <!-- ********************************************************************************************************************* -->
13138 </IDL>
13139
13140 <!--
13141     vim:noet:ts=4:sw=4:
13142 -->