]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP1847800 Admin grids support config_field links
[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" config_field="true"/>
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" config_field="true"/>
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                         <field reporter:label="Values" name="values" oils_persist:virtual="true" 
3554                                 reporter:datatype="link" config_field="true"/>
3555                 </fields>
3556                 <links>
3557             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3558                         <link field="values" reltype="has_many" key="hard_due_date" map="" class="chddv"/>
3559                 </links>
3560                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3561             <actions>
3562                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3563                 <retrieve/>
3564                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3565                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3566             </actions>
3567                 </permacrud>
3568         </class>
3569
3570         <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">
3571                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3572                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3573                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link" config_field="true"/>
3574                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3575             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3576                 </fields>
3577                 <links>
3578                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3579                 </links>
3580                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3581             <actions>
3582                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3583                 <retrieve/>
3584                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3585                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3586             </actions>
3587                 </permacrud>
3588         </class>
3589
3590         <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">
3591                 <fields oils_persist:primary="id" oils_persist:sequence="">
3592                         <field name="balance_owed" reporter:datatype="money"/>
3593                         <field name="id" reporter:datatype="id" />
3594                         <field name="last_billing_note" reporter:datatype="text"/>
3595                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3596                         <field name="last_billing_type" reporter:datatype="text"/>
3597                         <field name="last_payment_note" reporter:datatype="text"/>
3598                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3599                         <field name="last_payment_type" reporter:datatype="text"/>
3600                         <field name="total_owed" reporter:datatype="money"/>
3601                         <field name="total_paid" reporter:datatype="money"/>
3602                         <field name="usr" reporter:datatype="link"/>
3603                         <field name="xact_finish" reporter:datatype="timestamp" />
3604                         <field name="xact_start" reporter:datatype="timestamp" />
3605                         <field name="xact_type" reporter:datatype="text"/>
3606                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3607                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3608                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3609                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3610                         <field name="billing_location" reporter:datatype="link"/>
3611                 </fields>
3612                 <links>
3613                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3614                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3615                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3616                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3617                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3618                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3619                 </links>
3620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3621                         <actions>
3622                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3623                                         <context link="usr" field="home_ou" />
3624                                 </retrieve>
3625                         </actions>
3626                 </permacrud>
3627         </class>
3628         <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">
3629                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3630                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3631                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3632                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3633                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3634                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3635                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3636                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3637                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3638                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3639                         <field reporter:label="Privacy Waiver Entries" name = "waiver_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3640                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3641                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3642                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3643                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3644                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3645                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3646                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3647                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3648                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3649                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3650                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3651                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3652                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3653                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3654                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3655                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3656                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3657                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3658                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3659                         <field reporter:label="User ID" name="id" reporter:datatype="id" reporter:selector="usrname" />
3660                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3661                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3662                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3663                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3664                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3665                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3666                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3667                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3668                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3669                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3670                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3671                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3672                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3673                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3674                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3675                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3676                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3677                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3678                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3679                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3680                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3681                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3682                         <field reporter:label="Preferred Prefix" name="pref_prefix" reporter:datatype="text"/>
3683                         <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
3684                         <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
3685                         <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
3686                         <field reporter:label="Preferred Suffix" name="pref_suffix" reporter:datatype="text"/>
3687                         <field reporter:label="Parent/Guardian" name="guardian" reporter:datatype="text"/>
3688                         <field reporter:label="Name Keywords" name="name_keywords" reporter:datatype="text"/>
3689                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3690                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3691                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3692                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3693                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3694                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3695                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3696                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3697                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3698                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3699                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3700                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3701                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3702                 </fields>
3703                 <links>
3704                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3705                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3706                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3707                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3708                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3709                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3710                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3711                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3712                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3713                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3714                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3715                         <link field="waiver_entries" reltype="has_many" key="usr" map="" class="aupw"/>
3716                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3717                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3718                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3719                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3720                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3721                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3722                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3723                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3724                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3725                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3726                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3727                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3728                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3729                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3730                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3731                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3732                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3733                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3734                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3735                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3736                 </links>
3737                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3738                         <actions>
3739                                 <retrieve permission="VIEW_USER user_request.view" context_field="home_ou" />
3740                         </actions>
3741                 </permacrud>
3742         </class>
3743         <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">
3744                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3745                         <field name="id" reporter:label="ID" reporter:datatype="id" reporter:selector="label"/>
3746                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3747                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3748                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3749                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3750                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3751                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3752                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3753         </fields>
3754                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3755                         <actions>
3756                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3757                                 <retrieve/>
3758                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3759                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3760                         </actions>
3761                 </permacrud>
3762         </class>
3763         <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">
3764                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3765                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3766                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3767                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3768                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3769         </fields>
3770         <links>
3771                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3772                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3773                 </links>
3774                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3775                         <actions>
3776                                 <retrieve permission="RUN_REPORTS">
3777                                         <context link="usr" field="home_ou" />
3778                                 </retrieve>
3779                         </actions>
3780                 </permacrud>
3781         </class>
3782         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3783                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3784                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3785                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3786                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3787                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3788                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3789                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3790         </fields>
3791         <links>
3792                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3793                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3794                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3795                 </links>
3796                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3797                         <actions>
3798                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3799                                         <context link="usr" field="home_ou" />
3800                                         <context link="ws" field="owning_lib" />
3801                                 </retrieve>
3802                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3803                                         <context link="usr" field="home_ou" />
3804                                         <context link="ws" field="owning_lib" />
3805                                 </create>
3806                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3807                                         <context link="usr" field="home_ou" />
3808                                         <context link="ws" field="owning_lib" />
3809                                 </update>
3810                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3811                                         <context link="usr" field="home_ou" />
3812                                         <context link="ws" field="owning_lib" />
3813                                 </delete>
3814                         </actions>
3815                 </permacrud>
3816         </class>
3817         <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">
3818                 <fields oils_persist:primary="name">
3819                         <field name="name" reporter:datatype="text"/>
3820                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3821                 </fields>
3822                 <links/>
3823                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3824                         <actions>
3825                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3826                                 <retrieve/>
3827                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3828                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3829                         </actions>
3830                 </permacrud>
3831         </class>
3832         <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">
3833                 <fields oils_persist:primary="name">
3834                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3835                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3836                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3837                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3838                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3839                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3840                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3841                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3842                 </fields>
3843                 <links>
3844                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3845                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3846                 </links>
3847                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3848                         <actions>
3849                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3850                                 <retrieve/>
3851                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3852                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3853                         </actions>
3854                 </permacrud>
3855         </class>
3856         <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">
3857                 <fields oils_persist:primary="name">
3858                         <field name="name" reporter:datatype="text"/>
3859                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3860                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3861                         <field name="datatype" reporter:datatype="text"/>
3862                         <field name="view_perm" reporter:datatype="link"/>
3863                         <field name="update_perm" reporter:datatype="link"/>
3864                         <field name="fm_class" reporter:datatype="text"/>
3865                         <field name="grp" reporter:datatype="link"/>
3866                 </fields>
3867                 <links>
3868                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3869                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3870                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3871                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3872                 </links>
3873                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3874                         <actions>
3875                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3876                                 <retrieve/>
3877                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3878                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3879                         </actions>
3880                 </permacrud>
3881         </class>
3882         <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">
3883                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3884                         <field name="id" />
3885                         <field name="name"  reporter:datatype="text"/>
3886                         <field name="org_unit" reporter:datatype="org_unit"/>
3887                         <field name="value"  reporter:datatype="text"/>
3888                 </fields>
3889                 <links>
3890                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3891                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3892                 </links>
3893         </class>
3894         <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">
3895                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3896                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3897                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3898                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3899                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3900                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3901                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3902                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3903                 </fields>
3904                 <links>
3905                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3906                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3907                 </links>
3908         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3909             <actions>
3910                 <create permission="CREATE_COPY_NOTE">
3911                     <context link="owning_copy" field="circ_lib"/>
3912                 </create>
3913                 <retrieve permission="VIEW_COPY_NOTES">
3914                     <context link="owning_copy" field="circ_lib"/>
3915                 </retrieve>
3916                 <update permission="UPDATE_COPY_NOTE">
3917                     <context link="owning_copy" field="circ_lib"/>
3918                 </update>
3919                 <delete permission="DELETE_COPY_NOTE">
3920                     <context link="owning_copy" field="circ_lib"/>
3921                 </delete>
3922             </actions>
3923         </permacrud>
3924         </class>
3925         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3926                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3927                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3928                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3929                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3930                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3931                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3932                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3933                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3934                 </fields>
3935                 <links>
3936                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3937                 </links>
3938         </class>
3939         <class id="mmr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3940                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3941                         <field name="fingerprint"  reporter:datatype="text"/>
3942                         <field name="id" reporter:datatype="id" reporter:selector="fingerprint" />
3943                         <field name="master_record" reporter:datatype="link"/>
3944                         <field name="mods"  reporter:datatype="text"/>
3945                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3946                         <field name="source_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3947                 </fields>
3948                 <links>
3949                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3950                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3951                         <link field="source_maps" reltype="has_many" key="metarecord" class="mmrsm"/>
3952                 </links>
3953                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3954                         <actions>
3955                                 <retrieve/>
3956                         </actions>
3957                 </permacrud>
3958         </class>
3959         <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">
3960                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3961                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3962                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3963                 </fields>
3964                 <links/>
3965         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3966             <actions>
3967                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3968                 <retrieve/>
3969                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3970                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3971             </actions>
3972         </permacrud>
3973         </class>
3974         <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">
3975                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3976                         <field name="code"  reporter:datatype="text"/>
3977                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3978                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3979                 </fields>
3980                 <links/>
3981         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3982             <actions>
3983                 <create permission="CREATE_PERM" global_required="true"/>
3984                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3985                 <update permission="UPDATE_PERM" global_required="true"/>
3986                 <delete permission="DELETE_PERM" global_required="true"/>
3987             </actions>
3988         </permacrud>
3989         </class>
3990         <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">
3991                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3992                         <field name="id" reporter:datatype="id" />
3993                         <field name="metarecord" reporter:datatype="link"/>
3994                         <field name="source" reporter:datatype="link"/>
3995                 </fields>
3996                 <links>
3997                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3998                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3999                 </links>
4000                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4001                         <actions>
4002                                 <retrieve/>
4003                         </actions>
4004                 </permacrud>
4005         </class>
4006         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
4007                         oils_obj:fieldmapper="metabib::display_entry" 
4008                         oils_persist:tablename="metabib.display_entry" 
4009                         oils_persist:field_safe="true"
4010                         reporter:label="Display Field Entry" oils_persist:readonly="true">
4011                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
4012                         <field name="id" reporter:datatype="id" />
4013                         <field name="field" reporter:datatype="link"/>
4014                         <field name="source" reporter:datatype="link"/>
4015                         <field name="value"  reporter:datatype="text"/>
4016                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
4017                 </fields>
4018                 <links>
4019                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4020                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4021                 </links>
4022                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4023                         <actions>
4024                                 <retrieve/>
4025                         </actions>
4026                 </permacrud>
4027         </class>
4028         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
4029                 oils_persist:tablename="metabib.flat_display_entry"
4030                 oils_obj:fieldmapper="metabib::flat_display_entry" 
4031                 oils_persist:field_safe="true"
4032                 reporter:label="Flat Display Entry" 
4033                 oils_persist:readonly="true">
4034                 <fields>
4035                         <field name="source" reporter:datatype="id" />
4036                         <field name="name" reporter:datatype="text"/>
4037                         <field name="multi" reporter:datatype="bool"/>
4038                         <field name="label" reporter:datatype="text"/>
4039                         <field name="field" reporter:datatype="link"/>
4040                         <field name="value" reporter:datatype="text"/>
4041                 </fields>
4042                 <links>
4043                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4044                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4045                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4046                 </links>
4047                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4048                         <actions>
4049                                 <retrieve/>
4050                         </actions>
4051                 </permacrud>
4052         </class>
4053         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
4054                 oils_persist:tablename="metabib.compressed_display_entry"
4055                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
4056                 oils_persist:field_safe="true"
4057                 reporter:label="Compressed Display Entry" 
4058                 oils_persist:readonly="true">
4059                 <fields>
4060                         <field name="source" reporter:datatype="id" />
4061                         <field name="name" reporter:datatype="text"/>
4062                         <field name="multi" reporter:datatype="bool"/>
4063                         <field name="label" reporter:datatype="text"/>
4064                         <field name="field" reporter:datatype="link"/>
4065                         <field name="value" reporter:datatype="text"/>
4066                 </fields>
4067                 <links>
4068                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4069                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4070                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4071                 </links>
4072                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4073                         <actions>
4074                                 <retrieve/>
4075                         </actions>
4076                 </permacrud>
4077         </class>
4078         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
4079                 oils_persist:tablename="metabib.wide_display_entry"
4080                 oils_obj:fieldmapper="metabib::wide_display_entry" 
4081                 oils_persist:field_safe="true"
4082                 reporter:label="Wide Display Entry" 
4083                 oils_persist:readonly="true">
4084                 <fields oils_persist:primary="source">
4085                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
4086                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
4087                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
4088                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
4089                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
4090                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
4091                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
4092                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
4093                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
4094                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
4095                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
4096                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
4097                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
4098                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
4099                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
4100                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
4101                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
4102                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
4103                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
4104                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
4105                 </fields>
4106                 <links>
4107                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4108                 </links>
4109                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4110                         <actions>
4111                                 <retrieve/>
4112                         </actions>
4113                 </permacrud>
4114         </class>
4115
4116         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4117                 oils_persist:tablename="config.display_field_map"
4118                 oils_obj:fieldmapper="config::display_field_map"
4119                 oils_persist:field_safe="true"
4120                 reporter:label="Display Field Map">
4121                 <fields oils_persist:primary="name">
4122                         <field name="name" reporter:datatype="text"/>
4123                         <field name="field" reporter:datatype="link"/>
4124                         <field name="multi" reporter:datatype="bool"/>
4125                 </fields>
4126                 <links>
4127                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4128                 </links>
4129                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4130                         <actions>
4131                                 <retrieve/>
4132                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4133                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4134                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4135                         </actions>
4136                 </permacrud>
4137         </class>
4138
4139         <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">
4140                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4141                         <field name="id" reporter:datatype="id" />
4142                         <field name="field" reporter:datatype="link"/>
4143                         <field name="source" reporter:datatype="link"/>
4144                         <field name="value"  reporter:datatype="text"/>
4145                 </fields>
4146                 <links>
4147                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4148                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4149                 </links>
4150         </class>
4151         <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">
4152                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4153                         <field name="id" reporter:datatype="id" />
4154                         <field name="value" reporter:datatype="text"/>
4155                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4156                 </fields>
4157                 <links>
4158                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4159                 </links>
4160                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4161                         <actions>
4162                                 <retrieve/>
4163                         </actions>
4164                 </permacrud>
4165         </class>
4166         <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">
4167                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4168                         <field name="id" reporter:datatype="id" />
4169                         <field name="entry" reporter:datatype="link"/>
4170                         <field name="def" reporter:datatype="link"/>
4171                         <field name="source" reporter:datatype="link"/>
4172                 </fields>
4173                 <links>
4174                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4175                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4176                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4177                 </links>
4178         </class>
4179         <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">
4180                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4181                         <field name="id" reporter:datatype="id" />
4182                         <field name="entry" reporter:datatype="link"/>
4183                         <field name="simple_heading" reporter:datatype="link"/>
4184                 </fields>
4185                 <links>
4186                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4187                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4188                 </links>
4189         </class>
4190         <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">
4191                 <oils_persist:source_definition><![CDATA[
4192                         SELECT * FROM metabib.author_field_entry
4193                                                 UNION ALL
4194                         SELECT * FROM metabib.keyword_field_entry
4195                                                 UNION ALL
4196                         SELECT * FROM metabib.identifier_field_entry
4197                                                 UNION ALL
4198                         SELECT * FROM metabib.title_field_entry
4199                                                 UNION ALL
4200                         SELECT * FROM metabib.subject_field_entry
4201                                                 UNION ALL
4202                         SELECT * FROM metabib.series_field_entry
4203                 ]]></oils_persist:source_definition>
4204                 <fields>
4205                         <field name="field" reporter:datatype="link"/>
4206                         <field name="id" reporter:datatype="id" />
4207                         <field name="source" reporter:datatype="link"/>
4208                         <field name="value"  reporter:datatype="text"/>
4209                 </fields>
4210                 <links>
4211                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4212                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4213                 </links>
4214         </class>
4215         <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">
4216                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4217                         <field name="field" reporter:datatype="link"/>
4218                         <field name="id" reporter:datatype="id" />
4219                         <field name="source" reporter:datatype="link"/>
4220                         <field name="value"  reporter:datatype="text"/>
4221                 </fields>
4222                 <links>
4223                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4224                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4225                 </links>
4226         </class>
4227         <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">
4228                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4229                         <field name="accepting_usr" reporter:datatype="link"/>
4230                         <field name="amount" reporter:datatype="money" />
4231                         <field name="amount_collected" reporter:datatype="money" />
4232                         <field name="cash_drawer" reporter:datatype="link"/>
4233                         <field name="id" reporter:datatype="id" />
4234                         <field name="note"  reporter:datatype="text"/>
4235                         <field name="payment_ts" reporter:datatype="timestamp"/>
4236                         <field name="xact" reporter:datatype="link"/>
4237                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4238                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4239                 </fields>
4240                 <links>
4241                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4242                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4243                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4244                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4245                 </links>
4246         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4247             <actions>
4248                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4249                     <context link="xact" jump="usr" field="home_ou"/>
4250                 </retrieve>
4251                         </actions>
4252                 </permacrud>
4253         </class>
4254         <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">
4255                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4256                         <field name="accepting_usr" reporter:datatype="link"/>
4257                         <field name="amount" reporter:datatype="money" />
4258                         <field name="amount_collected" reporter:datatype="money" />
4259                         <field name="id" reporter:datatype="id" />
4260                         <field name="note"  reporter:datatype="text"/>
4261                         <field name="payment_ts" reporter:datatype="timestamp"/>
4262                         <field name="xact" reporter:datatype="link"/>
4263                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4264                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4265                 </fields>
4266                 <links>
4267                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4268                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4269                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4270                 </links>
4271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4272             <actions>
4273                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4274                     <context link="xact" jump="usr" field="home_ou"/>
4275                 </retrieve>
4276                         </actions>
4277                 </permacrud>
4278         </class>
4279         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4280                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4281                         <field name="accepting_usr" reporter:datatype="link"/>
4282                         <field name="amount" reporter:datatype="money" />
4283                         <field name="amount_collected" reporter:datatype="money" />
4284                         <field name="id" reporter:datatype="id" />
4285                         <field name="note"  reporter:datatype="text"/>
4286                         <field name="payment_ts" reporter:datatype="timestamp"/>
4287                         <field name="xact" reporter:datatype="link"/>
4288                         <field name="billing" reporter:datatype="link"/>
4289                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4290                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4291                 </fields>
4292                 <links>
4293                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4294                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4295                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4296                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4297                 </links>
4298         </class>
4299         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4300                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4301                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4302                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4303                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4304                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4305                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4306                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4307                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4308                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4309                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4310                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4311                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4312                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4313                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4314                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4315                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4316                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4317                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4318                 </fields>
4319                 <links>
4320                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4321                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4322                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4323                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4324                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4325                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4326                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4327                 </links>
4328         </class>
4329
4330         <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">
4331                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4332                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4333                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4334                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4335                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4336                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4337                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4338                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4339                 </fields>
4340                 <links/>
4341         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4342             <actions>
4343                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4344                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
4345                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4346                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4347             </actions>
4348         </permacrud>
4349         </class>
4350         <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">
4351                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4352                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4353                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4354                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4355                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4356                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4357                 </fields>
4358                 <links>
4359                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4360                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4361                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4362         </links>
4363         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4364             <actions>
4365                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4366                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4367                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4368                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4369             </actions>
4370         </permacrud>
4371         </class>
4372         <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">
4373                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4374                         <field name="holdable" reporter:datatype="bool"/>
4375                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4376                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4377                         <field name="opac_visible" reporter:datatype="bool"/>
4378             <field name="copy_active" reporter:datatype="bool"/>
4379             <field name="restrict_copy_delete" reporter:datatype="bool"/>
4380             <field name="is_available" reporter:datatype="bool"/>
4381                 </fields>
4382                 <links/>
4383         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4384             <actions>
4385                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4386                 <retrieve/>
4387                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4388                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4389             </actions>
4390         </permacrud>
4391         </class>
4392         <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">
4393                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
4394                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4395                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4396                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4397                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4398                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4399                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4400                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4401                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
4402                 </fields>
4403                 <links>
4404                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4405                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4406                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4407                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4408                 </links>
4409                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4410                         <actions>
4411                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4412                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4413                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4414                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4415                         </actions>
4416                 </permacrud>
4417         </class>
4418         <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">
4419                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4420                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4421                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4422                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4423                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4424                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4425                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4426                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4427                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4428                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4429                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4430                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4431                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4432                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4433                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4434                 </fields>
4435                 <links>
4436                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4437                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4438                 </links>
4439                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4440                         <actions>
4441                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4442                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4443                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4444                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4445                         </actions>
4446                 </permacrud>
4447         </class>
4448         <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">
4449                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4450                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4451                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4452                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4453                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4454                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4455                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4456                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4457                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4458                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4459                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4460                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4461                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4462                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4463                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4464                 </fields>
4465                 <links>
4466                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4467                 </links>
4468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4469                         <actions>
4470                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4471                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4472                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4473                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4474                         </actions>
4475                 </permacrud>
4476         </class>
4477
4478
4479         <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">
4480                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4481                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4482                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4483                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4484                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4485                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4486                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4487                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4488                 </fields>
4489                 <links>
4490                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4491                 </links>
4492         </class>
4493
4494         <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">
4495                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4496                         <field name="call_number" />
4497                         <field name="create_date" reporter:datatype="timestamp"/>
4498                         <field name="creator" reporter:datatype="link"/>
4499                         <field name="id" reporter:datatype="id" />
4500                         <field name="pub" reporter:datatype="bool"/>
4501                         <field name="title"  reporter:datatype="text"/>
4502                         <field name="value"  reporter:datatype="text"/>
4503                 </fields>
4504                 <links>
4505                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4506                 </links>
4507         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4508             <actions>
4509                 <create permission="CREATE_VOLUME_NOTE">
4510                     <context link="call_number" field="owning_lib"/>
4511                 </create>
4512                 <retrieve permission="VIEW_VOLUME_NOTES">
4513                     <context link="call_number" field="owning_lib"/>
4514                 </retrieve>
4515                 <update permission="UPDATE_VOLUME_NOTE">
4516                     <context link="call_number" field="owning_lib"/>
4517                 </update>
4518                 <delete permission="DELETE_VOLUME_NOTE">
4519                     <context link="call_number" field="owning_lib"/>
4520                 </delete>
4521             </actions>
4522         </permacrud>
4523         </class>
4524         <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">
4525                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4526                         <field name="create_date" reporter:datatype="timestamp"/>
4527                         <field name="creator" reporter:datatype="link"/>
4528                         <field name="edit_date" reporter:datatype="timestamp"/>
4529                         <field name="editor" reporter:datatype="link"/>
4530                         <field name="id" reporter:datatype="id" />
4531                         <field name="record" reporter:datatype="link"/>
4532                         <field name="value" reporter:datatype="text"/>
4533                 </fields>
4534                 <links>
4535                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4536                 </links>
4537         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4538             <actions>
4539                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4540                 <retrieve/>
4541                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4542                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4543             </actions>
4544         </permacrud>
4545         </class>
4546         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4547         <oils_persist:source_definition><![CDATA[
4548 SELECT  usr,
4549         SUM(
4550             CASE
4551                 WHEN (
4552                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4553                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4554                 ) THEN 1
4555                 ELSE 0
4556             END
4557         ) AS out,
4558
4559         SUM(
4560             CASE
4561                 WHEN (
4562                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4563                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4564                 ) THEN 1
4565                 ELSE 0
4566             END
4567         ) AS overdue,
4568
4569         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4570         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4571         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4572   FROM  action.circulation
4573   WHERE checkin_time IS NULL
4574   GROUP BY 1
4575         ]]></oils_persist:source_definition>
4576         <fields oils_persist:primary="usr">
4577             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4578             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4579             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4580             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4581             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4582             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4583         </fields>
4584         <links>
4585             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4586         </links>
4587         </class>
4588         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4589         <oils_persist:source_definition><![CDATA[
4590 SELECT  usr,
4591         STRING_AGG(
4592             CASE
4593                 WHEN (
4594                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4595                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4596                 ) THEN id::TEXT
4597                 ELSE '0'
4598             END
4599         ,',') AS out,
4600
4601         STRING_AGG(
4602             CASE
4603                 WHEN (
4604                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4605                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4606                 ) THEN id::TEXT
4607                 ELSE '0'
4608             END
4609         ,',') AS overdue,
4610
4611         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4612         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4613         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4614   FROM  action.circulation
4615   WHERE checkin_time IS NULL
4616   GROUP BY 1
4617         ]]></oils_persist:source_definition>
4618         <fields oils_persist:primary="usr">
4619             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4620             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4621             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4622             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4623             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4624             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4625         </fields>
4626         <links>
4627             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4628         </links>
4629         </class>
4630         <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">
4631                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4632                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4633                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4634                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4635                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4636                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4637                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4638                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4639                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4640                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4641                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4642                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4643                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4644                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4645                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4646                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4647                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4648                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4649                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4650                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4651                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4652                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4653                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4654                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4655                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4656                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4657                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4658                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4659                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4660                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4661                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4662                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4663                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4664                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4665                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4666                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4667                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4668                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4669                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4670                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4671                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4672                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4673                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4674                 </fields>
4675                 <links>
4676                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4677                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4678                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4679                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4680                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4681                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4682                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4683                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4684                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4685                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4686                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4687                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4688                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4689                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4690                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4691                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4692                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4693                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4694                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4695                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4696                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4697                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4698                 </links>
4699                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4700                         <actions>
4701                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4702                         </actions>
4703                 </permacrud>
4704         </class>
4705         <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">
4706                 <fields>
4707                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4708                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4709                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4710                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4711                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4712                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4713                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4714                 </fields>
4715                 <links>
4716                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4717                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4718                 </links>
4719                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4720                         <actions>
4721                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4722                         </actions>
4723                 </permacrud>
4724         </class>
4725         <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">
4726                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4727                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4728                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4729                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4730                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4731                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4732                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4733                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4734                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4735                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4736                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4737                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4738                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4739                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4740                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4741                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4742                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4743                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4744                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4745                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4746                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4747                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4748                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4749                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4750                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4751                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4752                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4753                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4754                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4755                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4756                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4757                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4758                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4759                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4760                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4761                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4762                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4763                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4764                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4765                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4766                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4767                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4768                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4769                 </fields>
4770                 <links>
4771                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4772                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4773                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4774                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4775                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4776                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4777                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
4778                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
4779                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4780                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4781                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4782                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4783                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4784                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4785                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4786                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4787                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4788                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4789                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4790                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4791                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4792                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4793                 </links>
4794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4795                         <actions>
4796                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4797                         </actions>
4798                 </permacrud>
4799         </class>
4800
4801         <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">
4802                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4803                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4804                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4805                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4806                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4807                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4808                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4809                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4810                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4811                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4812                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4813                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4814                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4815                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4816                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4817                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4818                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4819                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4820                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4821                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4822                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4823                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4824                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4825                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4826                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4827                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4828                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4829                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4830                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4831                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4832                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4833                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4834                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4835                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4836                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4837                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4838                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4839                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4840                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4841                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4842                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4843                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4844                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4845                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4846                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4847                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4848                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4849                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4850                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4851                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4852                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4853                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4854                 </fields>
4855                 <links>
4856                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4857                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4858                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4859                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4860                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4861                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4862                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
4863                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
4864                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4865                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4866                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4867                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4868                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4869                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4870                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4871                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4872                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4873                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4874                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4875                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4876                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4877                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4878                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4879                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4880                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4881                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4882                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4883                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4884                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4885                 </links>
4886                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4887                         <actions>
4888                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4889                         </actions>
4890                 </permacrud>
4891         </class>
4892         <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">
4893                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4894                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4895                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4896                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4897                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4898                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4899                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4900                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4901                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4902                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4903                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4904                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4905                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4906                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4907                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4908                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4909                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4910                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4911                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4912                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4913                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4914                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4915                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4916                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4917                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4918                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4919                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4920                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4921                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4922                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4923                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4924                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4925                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4926                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4927                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4928                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4929                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4930                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4931                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4932                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4933                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4934                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4935                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4936                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4937                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4938                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4939                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4940                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4941                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4942                 </fields>
4943                 <links>
4944                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4945                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4946                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4947                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4948                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4949                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4950                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
4951                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
4952                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4953                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4954                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4955                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4956                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4957                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4958                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4959                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4960                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4961                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4962                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4963                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4964                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4965                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4966                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4967                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4968                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4969                 </links>
4970         </class>
4971         <class id="auch" 
4972                 controller="open-ils.cstore" 
4973                 oils_obj:fieldmapper="action::user_circ_history" 
4974                 oils_persist:tablename="action.usr_circ_history" 
4975                 reporter:label="User Checkout History">
4976                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4977                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4978                         <!-- prevent reporting on the user that owns the checkout history -->
4979                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4980                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4981                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4982                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4983                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4984                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4985                 </fields>
4986                 <links>
4987                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4988                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4989                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4990                 </links>
4991         </class>
4992         <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">
4993                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4994                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4995                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
4996                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4997                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4998                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4999                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5000                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
5001                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
5002                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
5003                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
5004                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5005                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5006                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5007                 </fields>
5008                 <links>
5009                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5010                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5011                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
5012                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
5013                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
5014                 </links>
5015                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5016                         <actions>
5017                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5018                                 <retrieve permission="VIEW_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5019                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5020                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5021                         </actions>
5022                 </permacrud>
5023         </class>
5024
5025         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
5026                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
5027                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
5028                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5029                         <field reporter:label="Resource Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
5030                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
5031                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" oils_obj:required="true"/>
5032                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5033                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5034                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
5035                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5036                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5037                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5038                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
5039                 </fields>
5040                 <links>
5041                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5042                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
5043                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
5044                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
5045                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
5046                 </links>
5047                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5048                         <actions>
5049                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5050                                 <retrieve permission="VIEW_BOOKING_RESOURCE" context_field='owner'/>
5051                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5052                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5053                         </actions>
5054                 </permacrud>
5055         </class>
5056         
5057         <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">
5058                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
5059                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
5060                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5061                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5062                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
5063                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
5064                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
5065                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5066                 </fields>
5067                 <links>
5068                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5069                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
5070                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
5071                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
5072                 </links>
5073                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5074                         <actions>
5075                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5076                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5077                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5078                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5079                         </actions>
5080                 </permacrud>
5081         </class>
5082         
5083         <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">
5084                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
5085                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
5086                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5087                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link" oils_obj:required="true"/>
5088                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text" oils_obj:required="true"/>
5089                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5090                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5091                 </fields>
5092                 <links>
5093                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5094                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
5095                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
5096                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
5097                 </links>
5098                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5099                         <actions>
5100                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5101                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5102                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5103                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5104                         </actions>
5105                 </permacrud>
5106         </class>
5107         
5108         <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">
5109                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
5110                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
5111                         <field reporter:label="Resource" name="resource" reporter:datatype="link" oils_obj:required="true"/>
5112                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link" oils_obj:required="true"/>
5113                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link" oils_obj:required="true"/>
5114                 </fields>
5115                 <links>
5116                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
5117                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
5118                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
5119                 </links>
5120                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5121                         <actions>
5122                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5123                     <context link="resource" field="owner" />
5124                 </create>
5125                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5126                     <context link="resource" field="owner" />
5127                 </retrieve>
5128                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5129                     <context link="resource" field="owner" />
5130                 </update>
5131                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5132                     <context link="resource" field="owner" />
5133                 </delete>
5134                         </actions>
5135                 </permacrud>
5136         </class>
5137         
5138         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5139                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5140                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5141                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5142                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5143                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5144                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5145                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5146                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5147                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5148                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5149                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5150                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5151                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5152                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5153                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5154                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5155                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5156                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5157                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5158                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5159                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5160                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5161                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5162                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5163                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5164                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5165                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5166                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5167                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5168                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5169                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5170                 </fields>
5171                 <links>
5172                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5173                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5174                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5175                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5176                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5177                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5178                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5179                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5180                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5181                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5182                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5183                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5184                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5185                 </links>
5186                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5187                         <actions>
5188                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5189                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5190                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5191                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5192                         </actions>
5193                 </permacrud>
5194         </class>
5195         
5196         <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">
5197                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5198                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5199                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5200                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5201                 </fields>
5202                 <links>
5203                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5204                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5205                 </links>
5206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5207                         <actions>
5208                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5209                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5210                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5211                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5212                         </actions>
5213                 </permacrud>
5214         </class>
5215
5216         <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">
5217                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5218                         <field name="bucket" reporter:datatype="link"/>
5219                         <field name="id" reporter:datatype="id" />
5220                         <field name="target_call_number" reporter:datatype="link" />
5221                         <field name="create_time" reporter:datatype="timestamp" />
5222                         <field name="pos" reporter:datatype="int" />
5223                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5224                 </fields>
5225                 <links>
5226                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5227                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5228             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5229                 </links>
5230                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5231                         <actions>
5232                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5233                     <context link="bucket" owning_lib="owning_lib"/>
5234                 </retrieve>
5235             </actions>
5236         </permacrud>
5237         </class>
5238         <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">
5239                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5240                         <field name="id" reporter:datatype="id" />
5241                         <field name="item" reporter:datatype="link"/>
5242                         <field name="note" reporter:datatype="text" />
5243                 </fields>
5244                 <links>
5245                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5246                 </links>
5247         </class>
5248         <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">
5249                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5250                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5251                         <field name="btype" reporter:datatype="text"/>
5252                         <field name="id" reporter:datatype="id" />
5253                         <field name="name" reporter:datatype="text"/>
5254                         <field name="description" reporter:datatype="text"/>
5255                         <field name="owner" reporter:datatype="link"/>
5256                         <field name="pub" reporter:datatype="bool"/>
5257                         <field name="create_time" reporter:datatype="timestamp" />
5258                         <field name="owning_lib" reporter:datatype="org_unit" />
5259                 </fields>
5260                 <links>
5261                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5262                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5263                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5264                 </links>
5265                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5266                         <actions>
5267                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5268                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5269                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5270                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5271                         </actions>
5272                 </permacrud>
5273         </class>
5274         <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">
5275                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5276                         <field name="id" reporter:datatype="id" />
5277                         <field name="bucket" reporter:datatype="link"/>
5278                         <field name="note" reporter:datatype="text" />
5279                 </fields>
5280                 <links>
5281                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5282                 </links>
5283         </class>
5284         <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">
5285                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5286                         <field name="hold" reporter:datatype="link"/>
5287                         <field name="id" reporter:datatype="id" />
5288                         <field name="target_copy" reporter:datatype="link"/>
5289                         <field name="proximity" reporter:datatype="number"/>
5290                 </fields>
5291                 <links>
5292                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5293                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5294                 </links>
5295         </class>
5296         <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">
5297                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5298                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5299                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5300                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5301                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5302                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5303                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5304                 </fields>
5305                 <links>
5306                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5307                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5308                 </links>
5309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5310             <actions>
5311                 <create permission="CREATE_HOLD_NOTIFICATION">
5312                                         <context link="hold" jump="usr" field="home_ou" />
5313                                 </create>
5314                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5315                                         <context link="hold" jump="usr" field="home_ou" />
5316                                 </retrieve>
5317                 <update permission="CREATE_HOLD_NOTIFICATION">
5318                                         <context link="hold" jump="usr" field="home_ou" />
5319                                 </update>
5320                 <delete permission="CREATE_HOLD_NOTIFICATION">
5321                                         <context link="hold" jump="usr" field="home_ou" />
5322                                 </delete>
5323             </actions>
5324         </permacrud>
5325         </class>
5326         <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">
5327                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5328                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5329                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5330                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5331                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5332                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5333                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5334                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5335                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5336                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5337                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5338                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5339                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5340                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5341                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5342                 </fields>
5343                 <links>
5344                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5345                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5346                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5347                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5348                 </links>
5349         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5350             <actions>
5351                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5352                 <retrieve/>
5353                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5354                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5355             </actions>
5356         </permacrud>
5357         </class>
5358         <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">
5359                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5360                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5361                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5362                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5363                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
5364             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5365             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5366             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5367                 </fields>
5368                 <links>
5369                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5370                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5371                 </links>
5372         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5373             <actions>
5374                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5375                 <retrieve/>
5376                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5377                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5378             </actions>
5379         </permacrud>
5380         </class>
5381         <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">
5382                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5383                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5384             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5385             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5386                 </fields>
5387                 <links>
5388                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5389                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5390                 </links>
5391         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5392             <actions>
5393                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5394                                         <context link="lgroup" field="owner" />
5395                 </create>
5396                 <retrieve/>
5397                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5398                                         <context link="lgroup" field="owner" />
5399                 </update>
5400                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5401                                         <context link="lgroup" field="owner" />
5402                 </delete>
5403             </actions>
5404         </permacrud>
5405         </class>
5406
5407     <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">
5408         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5409             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5410             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5411             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5412             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5413         </fields>
5414         <links>
5415             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5416             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5417         </links>
5418         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5419             <actions>
5420                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5421                 <retrieve/>
5422                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5423                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5424             </actions>
5425         </permacrud>
5426     </class>
5427
5428         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5429                 <fields>
5430                         <field name="sre_id" oils_persist:virtual="true" />
5431                         <field name="location" oils_persist:virtual="true" />
5432                         <field name="owning_lib" oils_persist:virtual="true" />
5433                         <field name="basic_holdings" oils_persist:virtual="true" />
5434                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5435                         <field name="supplement_holdings" oils_persist:virtual="true" />
5436                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5437                         <field name="index_holdings" oils_persist:virtual="true" />
5438                         <field name="index_holdings_add" oils_persist:virtual="true" />
5439                         <field name="online" oils_persist:virtual="true" />
5440                         <field name="missing" oils_persist:virtual="true" />
5441                         <field name="incomplete" oils_persist:virtual="true" />
5442                 </fields>
5443         </class>
5444
5445         <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">
5446                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5447                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5448                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5449                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5450                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5451                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5452                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5453                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5454                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5455                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5456                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5457                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5458                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5459                 </fields>
5460                 <links>
5461                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5462                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5463                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5464                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5465                 </links>
5466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5467                         <actions>
5468                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5469                                 <retrieve/>
5470                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5471                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5472                         </actions>
5473                 </permacrud>
5474         </class>
5475
5476         <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">
5477                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5478                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5479                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5480                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5481                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5482                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5483                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5484                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5485                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5486                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5487                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5488                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5489                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5490                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5491                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5492                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5493                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5494                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5495                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5496                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5497                 </fields>
5498                 <links>
5499                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5500                 </links>
5501                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5502                         <actions>
5503                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5504                                         <context link="subscription" field="owning_lib" />
5505                                 </create>
5506                                 <retrieve />
5507                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5508                                         <context link="subscription" field="owning_lib" />
5509                                 </update>
5510                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5511                                         <context link="subscription" field="owning_lib" />
5512                                 </delete>
5513                         </actions>
5514                 </permacrud>
5515         </class>
5516
5517         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5518                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5519                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5520                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5521                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5522                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5523                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5524                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5525                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5526                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5527                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5528                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5529                 </fields>
5530                 <links>
5531                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5532                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5533                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5534                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5535                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5536                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5537                 </links>
5538                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5539                         <actions>
5540                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5541                                 <retrieve />
5542                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5543                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5544                         </actions>
5545                 </permacrud>
5546         </class>
5547
5548         <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">
5549                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5550                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5551                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5552                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5553                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5554                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5555                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5556                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5557                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5558                 </fields>
5559                 <links>
5560                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5561                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5562                 </links>
5563                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5564                         <actions>
5565                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5566                     <context link="subscription" field="owning_lib"/>
5567                 </create>
5568                                 <retrieve />
5569                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5570                     <context link="subscription" field="owning_lib"/>
5571                 </update>
5572                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5573                     <context link="subscription" field="owning_lib"/>
5574                 </delete>
5575                         </actions>
5576                 </permacrud>
5577         </class>
5578
5579         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5580                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5581                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5582                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5583                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5584                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5585                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5586                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5587                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5588                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5589                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5590                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5591                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5592                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5593                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5594                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5595                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5596                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5597                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5598                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5599                 </fields>
5600                 <links>
5601                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5602                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5603                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5604                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5605                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5606                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5607                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5608                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5609                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5610                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5611                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5612                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5613                 </links>
5614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5615                         <actions>
5616                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5617                                 <retrieve />
5618                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5619                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5620                         </actions>
5621                 </permacrud>
5622         </class>
5623
5624         <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">
5625                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5626                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5627                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5628                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5629                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5630                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5631                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5632                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5633                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5634                 </fields>
5635                 <links>
5636                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5637                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5638                 </links>
5639                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5640                         <actions>
5641                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5642                                         <context link="distribution" field="holding_lib" />
5643                                 </create>
5644                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5645                                         <context link="distribution" field="holding_lib" />
5646                                 </retrieve>
5647                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5648                                         <context link="distribution" field="holding_lib" />
5649                                 </update>
5650                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5651                                         <context link="distribution" field="holding_lib" />
5652                                 </delete>
5653                         </actions>
5654                 </permacrud>
5655         </class>
5656
5657         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5658                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5659                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5660                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5661                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5662                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5663                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5664                 </fields>
5665                 <links>
5666                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5667                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5668                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5669                 </links>
5670                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5671                         <actions>
5672                                 <create permission="ADMIN_SERIAL_STREAM">
5673                                         <context link="distribution" field="holding_lib" />
5674                                 </create>
5675                                 <retrieve />
5676                                 <update permission="ADMIN_SERIAL_STREAM">
5677                                         <context link="distribution" field="holding_lib" />
5678                                 </update>
5679                                 <delete permission="ADMIN_SERIAL_STREAM">
5680                                         <context link="distribution" field="holding_lib" />
5681                                 </delete>
5682                         </actions>
5683                 </permacrud>
5684         </class>
5685
5686         <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">
5687                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5688                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5689                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5690                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5691                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5692                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5693                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5694                 </fields>
5695                 <links>
5696                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5697                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5698                 </links>
5699                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5700                         <actions>
5701                                 <create permission="ADMIN_SERIAL_STREAM">
5702                                         <context link="stream" jump="distribution" field="holding_lib" />
5703                                 </create>
5704                                 <retrieve permission="RECEIVE_SERIAL">
5705                                         <context link="stream" jump="distribution" field="holding_lib" />
5706                                 </retrieve>
5707                                 <update permission="ADMIN_SERIAL_STREAM">
5708                                         <context link="stream" jump="distribution" field="holding_lib" />
5709                                 </update>
5710                                 <delete permission="ADMIN_SERIAL_STREAM">
5711                                         <context link="stream" jump="distribution" field="holding_lib" />
5712                                 </delete>
5713                         </actions>
5714                 </permacrud>
5715         </class>
5716
5717         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5718                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5719                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5720                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5721                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5722                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5723                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5724                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5725                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5726                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5727                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5728                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5729                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5730                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5731                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5732                 </fields>
5733                 <links>
5734                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5735                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5736                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5737                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5738                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5739                 </links>
5740                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5741                         <actions>
5742                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5743                                         <context link="subscription" field="owning_lib" />
5744                                 </create>
5745                                 <retrieve/>
5746                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5747                                         <context link="subscription" field="owning_lib" />
5748                                 </update>
5749                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5750                                         <context link="subscription" field="owning_lib" />
5751                                 </delete>
5752                         </actions>
5753                 </permacrud>
5754         </class>
5755
5756         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5757                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5758                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5759                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5760                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5761                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5762                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5763                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5764                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5765                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5766                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5767                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5768                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5769                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5770                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5771                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5772                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5773                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5774                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5775                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5776                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5777                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5778                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5779                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5780                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5781                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5782                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5783                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5784                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5785                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5786                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5787                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5788                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5789                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5790                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5791                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5792                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5793                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5794                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5795                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5796                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5797                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5798                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5799                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5800                 </fields>
5801                 <links>
5802                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5803                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5804                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5805                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5806                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5807                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5808                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5809                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5810                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5811                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5812                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5813                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5814                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5815                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5816                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5817                 </links>
5818                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5819                         <actions>
5820                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5821                                 <retrieve/>
5822                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5823                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5824                         </actions>
5825                 </permacrud>
5826         </class>
5827
5828         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5829                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5830                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5831                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5832                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5833                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5834                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5835                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5836                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5837                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5838                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5839                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5840                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5841                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5842                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5843                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5844                 </fields>
5845                 <links>
5846                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5847                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5848                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5849                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5850                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5851                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5852                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5853                 </links>
5854                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5855                         <actions>
5856                                 <create permission="ADMIN_SERIAL_ITEM">
5857                                         <context link="stream" jump="distribution" field="holding_lib" />
5858                                 </create>
5859                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5860                                         <context link="stream" jump="distribution" field="holding_lib" />
5861                                 </retrieve>
5862                                 <update permission="ADMIN_SERIAL_ITEM">
5863                                         <context link="stream" jump="distribution" field="holding_lib" />
5864                                 </update>
5865                                 <delete permission="ADMIN_SERIAL_ITEM">
5866                                         <context link="stream" jump="distribution" field="holding_lib" />
5867                                 </delete>
5868                         </actions>
5869                 </permacrud>
5870         </class>
5871
5872         <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">
5873                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5874                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5875                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5876                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5877                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5878                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5879                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5880                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5881                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5882                 </fields>
5883                 <links>
5884                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5885                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5886                 </links>
5887                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5888                         <actions>
5889                                 <create permission="ADMIN_SERIAL_ITEM">
5890                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5891                                 </create>
5892                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5893                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5894                                 </retrieve>
5895                                 <update permission="ADMIN_SERIAL_ITEM">
5896                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5897                                 </update>
5898                                 <delete permission="ADMIN_SERIAL_ITEM">
5899                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5900                                 </delete>
5901                         </actions>
5902                 </permacrud>
5903         </class>
5904         <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">
5905                 <fields>
5906                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5907                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5908                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5909                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5910                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5911                 </fields>
5912                 <links>
5913                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5914                 </links>
5915         </class>
5916         <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">
5917                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5918                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5919                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5920                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5921                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5922                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5923                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5924                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5925                 </fields>
5926                 <links>
5927                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5928                 </links>
5929         </class>
5930         <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">
5931                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5932                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5933                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5934                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5935                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5936                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5937                 </fields>
5938                 <links>
5939                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5940                 </links>
5941                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5942                         <actions>
5943                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5944                                         <context link="distribution" field="holding_lib" />
5945                                 </create>
5946                                 <retrieve/>
5947                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5948                                         <context link="distribution" field="holding_lib" />
5949                                 </update>
5950                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5951                                         <context link="distribution" field="holding_lib" />
5952                                 </delete>
5953                         </actions>
5954                 </permacrud>
5955         </class>
5956
5957         <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">
5958                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5959                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5960                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5961                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5962                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5963                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5964                 </fields>
5965                 <links>
5966                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5967                 </links>
5968                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5969                         <actions>
5970                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5971                                         <context link="distribution" field="holding_lib" />
5972                                 </create>
5973                                 <retrieve/>
5974                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5975                                         <context link="distribution" field="holding_lib" />
5976                                 </update>
5977                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5978                                         <context link="distribution" field="holding_lib" />
5979                                 </delete>
5980                         </actions>
5981                 </permacrud>
5982         </class>
5983
5984         <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">
5985                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5986                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5987                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5988                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5989                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5990                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5991                 </fields>
5992                 <links>
5993                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5994                 </links>
5995                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5996                         <actions>
5997                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5998                                         <context link="distribution" field="holding_lib" />
5999                                 </create>
6000                                 <retrieve/>
6001                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6002                                         <context link="distribution" field="holding_lib" />
6003                                 </update>
6004                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6005                                         <context link="distribution" field="holding_lib" />
6006                                 </delete>
6007                         </actions>
6008                 </permacrud>
6009         </class>
6010
6011         <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">
6012                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
6013                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6014                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
6015                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
6016                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
6017                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
6018                 </fields>
6019                 <links>
6020                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6021                 </links>
6022                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6023                         <actions>
6024                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6025                                 <retrieve/>
6026                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6027                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6028                         </actions>
6029                 </permacrud>
6030         </class>
6031
6032         <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">
6033                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
6034                         <field name="id" reporter:datatype="id" />
6035                         <field name="owning_copy" reporter:datatype="link"/>
6036                         <field name="stat_cat" reporter:datatype="link"/>
6037                         <field name="stat_cat_entry" reporter:datatype="link"/>
6038                 </fields>
6039                 <links>
6040                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
6041                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
6042                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6043                 </links>
6044                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6045                         <actions>
6046                                 <retrieve/>
6047                         </actions>
6048                 </permacrud>
6049         </class>
6050         <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">
6051                 <fields oils_persist:primary="code">
6052                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
6053                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6054                 </fields>
6055                 <links/>
6056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6057             <actions>
6058                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
6059                 <retrieve/>
6060                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
6061                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
6062             </actions>
6063         </permacrud>
6064         </class>
6065         <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">
6066                 <fields oils_persist:primary="code">
6067                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
6068                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6069                 </fields>
6070                 <links/>
6071         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6072             <actions>
6073                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6074                 <retrieve/>
6075                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6076                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6077             </actions>
6078         </permacrud>
6079         </class>
6080         <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">
6081                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
6082                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
6083                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
6084                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
6085                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
6086                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
6087                 </fields>
6088                 <links>
6089             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6090         </links>
6091         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6092             <actions>
6093                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6094                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6095                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6096                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6097             </actions>
6098         </permacrud>
6099         </class>
6100         <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">
6101                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
6102                         <field name="id" reporter:datatype="id" />
6103                         <field name="name" reporter:datatype="text"/>
6104                 </fields>
6105                 <links/>
6106         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6107             <actions>
6108                 <create permission="CREATE_LASSO" global_required="true"/>
6109                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
6110                 <update permission="UPDATE_LASSO" global_required="true"/>
6111                 <delete permission="DELETE_LASSO" global_required="true"/>
6112             </actions>
6113         </permacrud>
6114         </class>
6115         <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">
6116                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
6117                         <field name="id" reporter:datatype="id" />
6118                         <field name="lasso" reporter:datatype="link"/>
6119                         <field name="org_unit" reporter:datatype="org_unit"/>
6120                 </fields>
6121                 <links>
6122                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6123                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6124                 </links>
6125         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6126             <actions>
6127                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
6128                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
6129                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
6130                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
6131             </actions>
6132         </permacrud>
6133         </class>
6134         <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">
6135                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6136                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6137                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6138                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6139                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6140                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6141                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6142                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6143                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
6144                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6145                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6146                 </fields>
6147                 <links>
6148                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6149                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6150                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6151                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6152                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6153                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6154                 </links>
6155         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6156             <actions>
6157                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6158                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6159                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6160                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6161             </actions>
6162         </permacrud>
6163         </class>
6164         <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">
6165                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6166                         <field name="id" reporter:datatype="id" />
6167                         <field name="from_org" reporter:datatype="org_unit"/>
6168                         <field name="to_org" reporter:datatype="org_unit"/>
6169                         <field name="prox" reporter:datatype="int" />
6170                 </fields>
6171                 <links>
6172                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6173                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6174                 </links>
6175         </class>
6176         <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">
6177                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6178                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6179                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6180                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6181                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6182                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6183                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6184                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6185                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6186                 </fields>
6187                 <links/>
6188         </class>
6189         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6190                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6191                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6192                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6193                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6194                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6195                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6196                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6197                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6198                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6199                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6200                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6201                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6202                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6203                 </fields>
6204                 <links>
6205                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6206                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6207                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6208                 </links>
6209         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6210             <actions>
6211                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6212                 <retrieve/>
6213                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6214                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6215             </actions>
6216         </permacrud>
6217         </class>
6218         <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">
6219                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6220                         <field name="address_type" reporter:label="Address Type" reporter:datatype="text" oils_obj:required="true" />
6221                         <field name="city" reporter:label="City" reporter:datatype="text" oils_obj:required="true"/>
6222                         <field name="country" reporter:label="Country" reporter:datatype="text" oils_obj:required="true"/>
6223                         <field name="county" reporter:label="County" reporter:datatype="text"/>
6224                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6225                         <field name="org_unit" reporter:label="Org Unit" reporter:datatype="org_unit" oils_obj:required="true"/>
6226                         <field name="post_code" reporter:label="Post Code" reporter:datatype="text" oils_obj:required="true"/>
6227                         <field name="state" reporter:label="State" reporter:datatype="text"/>
6228                         <field name="street1" reporter:label="Street1" reporter:datatype="text" oils_obj:required="true"/>
6229                         <field name="street2" reporter:label="Street2" reporter:datatype="text"/>
6230                         <field name="valid" reporter:label="Is Valid?" reporter:datatype="bool" oils_obj:required="true"/>
6231                         <field name="san" reporter:label="SAN" reporter:datatype="text"/>
6232                 </fields>
6233                 <links>
6234                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6235                 </links>
6236         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6237             <actions>
6238                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6239                 <retrieve/>
6240                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6241                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6242             </actions>
6243         </permacrud>
6244         </class>
6245         <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">
6246                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6247                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6248                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6249                         <field name="query_text" reporter:datatype="text"/>
6250                 </fields>
6251         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6252             <actions>
6253                 <retrieve/>
6254             </actions>
6255         </permacrud>
6256         </class>
6257
6258         <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">
6259                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6260                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6261                         <field name="owner" reporter:datatype="org_unit"/>
6262                         <field name="code" reporter:datatype="text"/>
6263                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6264                         <field name="create_date" reporter:datatype="timestamp"/>
6265                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6266                 </fields>
6267                 <links>
6268                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6269                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6270                 </links>
6271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6272             <actions>
6273                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6274                 <retrieve/>
6275                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6276                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6277             </actions>
6278         </permacrud>
6279         </class>
6280         <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">
6281                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6282                         <field name="id" reporter:datatype="id"/>
6283                         <field name="grp" reporter:datatype="link"/>
6284                         <field name="pos" reporter:datatype="int"/>
6285                         <field name="query" reporter:datatype="link"/>
6286                 </fields>
6287                 <links>
6288                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6289                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6290                 </links>
6291         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6292             <actions>
6293                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6294                     <context link="grp" field="owner"/>
6295                 </create>
6296                 <retrieve/>
6297                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6298                     <context link="grp" field="owner"/>
6299                 </update>
6300                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6301                     <context link="grp" field="owner"/>
6302                 </delete>
6303             </actions>
6304         </permacrud>
6305         </class>
6306
6307         <!-- A note: Please update alhr and ahopl when updating ahr -->
6308         <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">
6309                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6310                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6311                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6312                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6313                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6314                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6315                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6316                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6317                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6318                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6319                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6320                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6321                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6322                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6323                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6324                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6325                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6326                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6327                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6328                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6329                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6330                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6331                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6332                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6333                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6334                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6335                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6336                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6337                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6338                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6339                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6340                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6341                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6342                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6343                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6344                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6345                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6346                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6347                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6348                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6349                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6350                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6351                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6352                 </fields>
6353                 <links>
6354                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6355                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6356                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6357                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6358                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6359                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6360                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6361                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6362                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6363                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6364                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6365                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6366                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6367                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6368                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6369                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6370                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6371                         <link field="hold_type" reltype="has_a" key="hold_type" map="" class="cht"/>
6372                 </links>
6373                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6374                         <actions>
6375                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6376                         </actions>
6377                 </permacrud>
6378         </class>
6379         <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">
6380                 <oils_persist:source_definition><![CDATA[
6381                 SELECT
6382                         ahr.*,
6383                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6384                                 copy_location_order_position,
6385                         CASE WHEN au.alias IS NOT NULL THEN
6386                                 au.alias
6387                         ELSE
6388                                 au.first_given_name
6389                         END AS usr_alias_or_first_given_name,
6390                         au.first_given_name AS usr_first_given_name,
6391                         au.second_given_name AS usr_second_given_name,
6392                         au.family_name AS usr_family_name,
6393                         au.prefix AS usr_prefix,
6394                         au.suffix AS usr_suffix,
6395                         au.alias AS usr_alias,
6396                         CASE WHEN au.alias IS NOT NULL THEN
6397                                 au.alias
6398                         ELSE
6399                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6400                                         COALESCE(au.family_name, ''),
6401                                         COALESCE(au.suffix, ''),
6402                                         ', ',
6403                                         COALESCE(au.prefix, ''),
6404                                         COALESCE(au.first_given_name, ''),
6405                                         COALESCE(au.second_given_name, '')
6406                                 ], ' '), E'\\s+,', ',')
6407                         END AS usr_alias_or_display_name,
6408                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6409                                 COALESCE(au.family_name, ''),
6410                                 COALESCE(au.suffix, ''),
6411                                 ', ',
6412                                 COALESCE(au.prefix, ''),
6413                                 COALESCE(au.first_given_name, ''),
6414                                 COALESCE(au.second_given_name, '')
6415                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6416                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6417                                 AS call_number_label,
6418                         siss.label AS issuance_label,
6419                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6420                         ahcm_1.copy_count AS potential_copies
6421                 FROM action.hold_request ahr
6422                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6423                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6424                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6425                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6426                 JOIN actor.usr au ON (au.id = ahr.usr)
6427                 JOIN (
6428                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6429                         FROM asset.copy_location
6430                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6431                 LEFT JOIN actor.usr_standing_penalty ausp 
6432                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6433                 LEFT JOIN config.standing_penalty csp
6434                         ON (
6435                                 csp.id = ausp.standing_penalty AND 
6436                                 csp.block_list LIKE '%CAPTURE%' AND (
6437                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6438                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6439                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6440                                         )
6441                                 )
6442                         )
6443                 JOIN (
6444                         SELECT COUNT(target_copy) AS copy_count, hold
6445                         FROM action.hold_copy_map
6446                         GROUP BY 2
6447                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6448                 LEFT JOIN serial.issuance siss
6449                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6450                 LEFT JOIN asset.copy_location_order acplo
6451                         ON (acp.location = acplo.location AND
6452                                 acp.circ_lib = acplo.org)
6453                 WHERE
6454                         ahr.capture_time IS NULL AND
6455                         ahr.cancel_time IS NULL AND
6456                         csp.id IS NULL AND
6457                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6458                         acp.status IN (0,7)
6459                 ]]></oils_persist:source_definition>
6460                 <fields oils_persist:primary="id">
6461                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6462                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6463                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6464                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6465                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6466                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6467                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6468                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6469                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6470                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6471                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6472                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6473                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6474                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6475                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6476                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6477                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6478                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6479                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6480                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6481                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6482                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6483                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6484                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6485                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6486                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6487                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6488                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6489                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6490                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6491                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6492                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6493                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6494                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6495                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6496                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6497                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6498                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6499                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6500                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6501                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6502                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6503                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6504                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6505                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6506                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6507                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6508                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6509                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6510                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6511                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6512                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6513                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6514                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6515                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6516                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6517                 </fields>
6518                 <links>
6519                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6520                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6521                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6522                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6523                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6524                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6525                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6526                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6527                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6528                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6529                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6530                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6531                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6532                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6533                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6534                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6535                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6536                 </links>
6537                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6538                         <actions>
6539                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6540                         </actions>
6541                 </permacrud>
6542         </class>
6543         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6544                 <oils_persist:source_definition><![CDATA[
6545                         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)
6546                 ]]></oils_persist:source_definition>
6547                 <fields oils_persist:primary="id">
6548                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6549                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6550                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6551                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6552                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6553                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6554                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6555                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6556                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6557                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6558                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6559                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6560                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6561                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6562                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6563                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6564                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6565                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6566                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6567                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6568                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6569                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6570                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6571                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6572                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6573                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6574                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6575                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6576                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6577                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6578                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6579                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6580                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6581                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6582                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6583                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6584                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6585                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6586                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6587                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6588                 </fields>
6589                 <links>
6590                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6591                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6592                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6593                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6594                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6595                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6596                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6597                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6598                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6599                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6600                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6601                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6602                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6603                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6604                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6605                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6606                 </links>
6607         </class>
6608
6609         <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">
6610                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6611                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6612                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6613                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6614                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6615                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6616                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6617                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6618                 </fields>
6619                 <links>
6620                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6621                 </links>
6622                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6623                         <actions>
6624                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6625                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6626                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6627                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6628                         </actions>
6629                 </permacrud>
6630         </class>
6631         <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">
6632                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6633                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6634                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6635                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6636                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6637                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6638                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6639                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6640                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6641                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6642                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6643                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6644                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6645                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6646                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6647                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6648                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6649                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6650                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6651                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6652                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6653                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6654                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6655                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6656                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6657                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6658                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6659                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6660                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6661                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6662                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6663                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6664                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6665                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6666                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6667                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6668                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6669                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6670                 </fields>
6671                 <links>
6672                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6673                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6674                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6675                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6676                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6677                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6678                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6679                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6680                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6681                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6682                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6683                 </links>
6684                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6685                         <actions>
6686                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6687                         </actions>
6688                 </permacrud>
6689         </class>
6690         <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">
6691                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6692                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6693                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6694                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6695                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6696                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6697                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6698                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6699                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6700                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6701                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6702                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6703                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6704                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6705                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6706                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6707                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6708                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6709                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6710                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6711                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6712                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6713                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6714                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6715                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6716                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6717                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6718                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6719                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6720                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6721                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6722                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6723                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6724                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6725                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6726                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6727                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6728                 </fields>
6729                 <links>
6730                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6731                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6732                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6733                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6734                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6735                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6736                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6737                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6738                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6739                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6740                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6741                 </links>
6742                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6743                         <actions>
6744                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6745                         </actions>
6746                 </permacrud>
6747         </class>
6748
6749         <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">
6750                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6751                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6752                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6753                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6754                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6755                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6756                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6757                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
6758                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link" oils_obj:required="true"/>
6759                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6760                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6761                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6762                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6763                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6764                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link" oils_obj:required="true"/>
6765                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6766                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6767                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6768                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6769                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6770                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6771                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6772                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6773                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6774                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6775                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6776                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6777                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6778                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6779                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6780                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6781                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6782                 </fields>
6783                 <links>
6784                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6785                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6786                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6787                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6788                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6789                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6790                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6791                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6792                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6793                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6794                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6795                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6796                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6797                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6798                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6799                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6800                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6801                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6802                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6803                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6804                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6805                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6806                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6807                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6808                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6809                 </links>
6810         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6811             <actions>
6812                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6813                 <retrieve />
6814                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6815                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6816             </actions>
6817         </permacrud>
6818         </class>
6819         <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">
6820                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6821                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6822                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6823                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6824                 </fields>
6825                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6826                         <actions>
6827                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6828                                 <retrieve/>
6829                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6830                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6831                         </actions>
6832                 </permacrud>
6833         </class>
6834         <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">
6835                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6836                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6837                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6838                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6839                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6840                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6841                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6842                 </fields>
6843                 <links>
6844                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6845                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6846                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6847                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6848                 </links>
6849                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6850                         <actions>
6851                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6852                                 <retrieve/>
6853                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6854                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6855                         </actions>
6856                 </permacrud>
6857         </class>
6858         <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">
6859                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6860                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6861                         <field name="btype" reporter:datatype="text"/>
6862                         <field name="id" reporter:datatype="id" />
6863                         <field name="name"  reporter:datatype="text"/>
6864                         <field name="description" reporter:datatype="text"/>
6865                         <field name="owner" reporter:datatype="link"/>
6866                         <field name="pub" reporter:datatype="bool"/>
6867                         <field name="create_time" reporter:datatype="timestamp" />
6868                         <field name="owning_lib" reporter:datatype="org_unit" />
6869                 </fields>
6870                 <links>
6871                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6872                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6873                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6874                 </links>
6875                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6876                         <actions>
6877                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6878                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6879                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6880                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6881                         </actions>
6882                 </permacrud>
6883         </class>
6884         <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">
6885                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6886                         <field name="id" reporter:datatype="id" />
6887                         <field name="bucket" reporter:datatype="link"/>
6888                         <field name="note" reporter:datatype="text" />
6889                 </fields>
6890                 <links>
6891                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6892                 </links>
6893         </class>
6894         <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">
6895                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6896                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6897                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6898                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6899                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6900                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6901                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6902                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6903                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6904                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6905                 </fields>
6906                 <links>
6907                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6908                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6909                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6910                 </links>
6911                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6912                         <actions>
6913                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6914                         </actions>
6915                 </permacrud>
6916         </class>
6917         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6918                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6919                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6920                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6921                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6922                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6923                 </fields>
6924                 <links>
6925                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6926                 </links>
6927                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6928                         <actions>
6929                                 <retrieve permission="VIEW_USER user_request.view">
6930                                         <context link="usr" field="home_ou" />
6931                                 </retrieve>
6932                         </actions>
6933                 </permacrud>
6934         </class>
6935     <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">
6936         <fields oils_persist:primary="field">
6937             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6938             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6939             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6940         </fields>
6941         <links/>
6942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6943             <actions>
6944                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6945                 <retrieve />
6946                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6947                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6948             </actions>
6949         </permacrud>
6950     </class>
6951         <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">
6952                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6953                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6954                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6955                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6956                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6957                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6958                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6959                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6960                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6961                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6962                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6963                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6964                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6965                 </fields>
6966                 <links>
6967                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6968                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6969                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6970                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6971                 </links>
6972         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6973             <actions>
6974                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6975                 <retrieve />
6976                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6977                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6978             </actions>
6979         </permacrud>
6980         </class>
6981         <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">
6982                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6983                         <field name="field" reporter:datatype="link"/>
6984                         <field name="id" reporter:datatype="id" />
6985                         <field name="source" reporter:datatype="link"/>
6986                         <field name="value"  reporter:datatype="text"/>
6987                 </fields>
6988                 <links>
6989                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6990                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6991                 </links>
6992         </class>
6993         <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">
6994                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6995                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6996                         <field name="btype" reporter:datatype="text"/>
6997                         <field name="id" reporter:datatype="id" />
6998                         <field name="name"  reporter:datatype="text"/>
6999                         <field name="description" reporter:datatype="text"/>
7000                         <field name="owner" reporter:datatype="link"/>
7001                         <field name="pub" reporter:datatype="bool"/>
7002                         <field name="create_time" reporter:datatype="timestamp" />
7003                         <field name="owning_lib" reporter:datatype="org_unit" />
7004                 </fields>
7005                 <links>
7006                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7007                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7008                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
7009                 </links>
7010                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7011                         <actions>
7012                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7013                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7014                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7015                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7016                         </actions>
7017                 </permacrud>
7018         </class>
7019         <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">
7020                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
7021                         <field name="id" reporter:datatype="id" />
7022                         <field name="bucket" reporter:datatype="link"/>
7023                         <field name="note" reporter:datatype="text" />
7024                 </fields>
7025                 <links>
7026                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7027                 </links>
7028         </class>
7029         <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">
7030                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7031                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7032                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7033                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7034                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
7035                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
7036                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7037                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7038                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
7039                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7040                 </fields>
7041                 <links>
7042                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7043                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7044                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7045                 </links>
7046         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7047             <actions>
7048                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7049                     <context link="xact" jump="usr" field="home_ou"/>
7050                 </retrieve>
7051                         </actions>
7052                 </permacrud>
7053         </class>
7054         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
7055                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
7056                         <field name="id" reporter:datatype="id" />
7057                         <field name="ind1" />
7058                         <field name="ind2" />
7059                         <field name="record" />
7060                         <field name="subfield" />
7061                         <field name="tag" />
7062                         <field name="value" />
7063                 </fields>
7064                 <links>
7065                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
7066                 </links>
7067         </class>
7068         <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">
7069                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
7070                         <field name="id" reporter:label="ID" reporter:datatype="id" />
7071                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
7072                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
7073                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
7074                 </fields>
7075                 <links>
7076                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
7077                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
7078                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
7079                 </links>
7080         </class>
7081         <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">
7082                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
7083                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
7084                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7085                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
7086                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7087                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
7088                 </fields>
7089                 <links>
7090                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7091                 </links>
7092         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7093             <actions>
7094                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7095                 <retrieve/>
7096                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7097                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7098             </actions>
7099         </permacrud>
7100
7101         </class>
7102         <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">
7103                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
7104                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7105                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
7106                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
7107                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
7108                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7109                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7110                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
7111                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
7112                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
7113                 </fields>
7114                 <links>
7115                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
7116                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
7117                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
7118                 </links>
7119         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7120             <actions>
7121                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
7122                 <retrieve/>
7123                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
7124                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
7125             </actions>
7126         </permacrud>
7127         </class>
7128         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
7129                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7130                         <field name="create_date" reporter:datatype="timestamp"/>
7131                         <field name="creator" reporter:datatype="link"/>
7132                         <field name="edit_date" reporter:datatype="timestamp"/>
7133                         <field name="editor" reporter:datatype="link"/>
7134                         <field name="id" reporter:datatype="id" />
7135                         <field name="pub" reporter:datatype="bool"/>
7136                         <field name="record" reporter:datatype="link"/>
7137                         <field name="value"  reporter:datatype="text"/>
7138                 </fields>
7139                 <links>
7140                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7141                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7142                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7143                 </links>
7144         </class>
7145         <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">
7146                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7147                         <field name="balance_owed" reporter:datatype="money" />
7148                         <field name="total_owed" reporter:datatype="money" />
7149                         <field name="total_paid" reporter:datatype="money" />
7150                         <field name="usr" reporter:datatype="link"/>
7151                 </fields>
7152                 <links>
7153                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7154                 </links>
7155         </class>
7156     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7157                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7158                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7159                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7160                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7161                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7162                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7163                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7164                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7165                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7166                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7167                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7168                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7169                 </fields>
7170                 <links>
7171                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7172                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7173                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7174                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7175                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7176                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7177                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7178                 </links>
7179         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7180             <actions>
7181                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7182             </actions>
7183         </permacrud>
7184         </class>
7185         <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">
7186                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7187                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7188                         <field name="quality" reporter:datatype="int" />
7189                         <field name="source" reporter:datatype="text"/>
7190                         <field name="transcendant" reporter:datatype="bool"/>
7191                         <field name="can_have_copies" reporter:datatype="bool"/>
7192                 </fields>
7193                 <links/>
7194         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7195             <actions>
7196                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7197                 <retrieve/>
7198                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7199                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7200             </actions>
7201         </permacrud>
7202         </class>
7203         <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">
7204                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7205                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7206                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7207                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7208                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7209                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7210                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7211                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7212                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7213                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7214                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7215                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7216                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7217                 </fields>
7218                 <links>
7219                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7220                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7221                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7222                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7223                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7224                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7225                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7226                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7227                 </links>
7228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7229                         <actions>
7230                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7231                                         <context link="usr" field="home_ou" />
7232                                 </retrieve>
7233                         </actions>
7234                 </permacrud>
7235         </class>
7236         <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">
7237                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7238                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7239                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7240                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7241                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7242                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7243                 </fields>
7244                 <links>
7245                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7246                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7247                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7248                 </links>
7249         </class>
7250         <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">
7251                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7252                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7253                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7254                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7255                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7256                 </fields>
7257                 <links>
7258                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7259                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7260                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7261                 </links>
7262         </class>
7263         <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">
7264                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7265                         <field name="bucket" reporter:datatype="link"/>
7266                         <field name="id" reporter:datatype="id" />
7267                         <field name="target_user" reporter:datatype="link"/>
7268                         <field name="create_time" reporter:datatype="timestamp" />
7269                         <field name="pos" reporter:datatype="int" />
7270                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7271                 </fields>
7272                 <links>
7273                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7274                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7275             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7276                 </links>
7277                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7278                         <actions>
7279                                 <retrieve permission="ADMIN_USER_BUCKET">
7280                     <context link="bucket" owning_lib="owning_lib"/>
7281                 </retrieve>
7282             </actions>
7283         </permacrud>
7284         </class>
7285         <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">
7286                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7287                         <field name="id" reporter:datatype="id" />
7288                         <field name="item" reporter:datatype="link"/>
7289                         <field name="note" reporter:datatype="text" />
7290                 </fields>
7291                 <links>
7292                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7293                 </links>
7294         </class>
7295         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7296                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7297                         <field name="balance_owed" reporter:datatype="money" />
7298                         <field name="total_owed" reporter:datatype="money" />
7299                         <field name="total_paid" reporter:datatype="money" />
7300                         <field name="usr" reporter:datatype="link"/>
7301                 </fields>
7302                 <links>
7303                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7304                 </links>
7305         </class>
7306         <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">
7307                 <fields oils_persist:primary="code" oils_persist:sequence="">
7308                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7309                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7310                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7311                 </fields>
7312                 <links/>
7313         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7314             <actions>
7315                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7316                 <retrieve/>
7317                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7318                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7319             </actions>
7320         </permacrud>
7321         </class>
7322         <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">
7323                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7324                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7325                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7326                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7327                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7328                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7329                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7330                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7331                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7332                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7333                 </fields>
7334                 <links>
7335                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7336                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7337                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7338                 </links>
7339         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7340             <actions>
7341                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7342                     <context link="xact" jump="usr" field="home_ou"/>
7343                 </retrieve>
7344                         </actions>
7345                 </permacrud>
7346         </class>
7347         <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">
7348                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7349                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7350                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7351                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7352                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7353                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7354                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7355                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7356                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7357                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7358                 </fields>
7359                 <links>
7360                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7361                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7362                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7363                 </links>
7364         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7365             <actions>
7366                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7367                     <context link="xact" jump="usr" field="home_ou"/>
7368                 </retrieve>
7369                         </actions>
7370                 </permacrud>
7371         </class>
7372         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7373                 <fields oils_persist:primary="id" oils_persist:sequence="">
7374                         <field name="checkin_lib" reporter:datatype="link"/>
7375                         <field name="checkin_staff" reporter:datatype="link"/>
7376                         <field name="checkin_time" reporter:datatype="timestamp"/>
7377                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7378                         <field name="circ_staff" reporter:datatype="link"/>
7379                         <field name="desk_renewal" reporter:datatype="bool"/>
7380                         <field name="due_date" reporter:datatype="timestamp"/>
7381                         <field name="duration" reporter:datatype="interval"/>
7382                         <field name="duration_rule" reporter:datatype="link"/>
7383                         <field name="fine_interval" reporter:datatype="interval"/>
7384                         <field name="id" reporter:datatype="id" />
7385                         <field name="max_fine" reporter:datatype="money" />
7386                         <field name="max_fine_rule" reporter:datatype="link"/>
7387                         <field name="opac_renewal" reporter:datatype="bool"/>
7388                         <field name="phone_renewal" reporter:datatype="bool"/>
7389                         <field name="recurring_fine" reporter:datatype="money" />
7390                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7391                         <field name="renewal_remaining" reporter:datatype="int" />
7392             <field name="grace_period" reporter:datatype="interval" />
7393                         <field name="stop_fines" reporter:datatype="text"/>
7394                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7395                         <field name="target_copy" reporter:datatype="link"/>
7396                         <field name="usr" reporter:datatype="link"/>
7397                         <field name="xact_finish" reporter:datatype="timestamp" />
7398                         <field name="xact_start" reporter:datatype="timestamp" />
7399                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7400                         <field name="auto_renewal" reporter:datatype="bool"/>
7401                         <field name="auto_renewal_remaining" reporter:datatype="int" />
7402                 </fields>
7403                 <links>
7404                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7405                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7406                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7407                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7408                 </links>
7409         </class>
7410         <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">
7411                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7412                         <field name="field" reporter:datatype="link"/>
7413                         <field name="id" reporter:datatype="id" />
7414                         <field name="source" reporter:datatype="link"/>
7415                         <field name="value" reporter:datatype="text"/>
7416                 </fields>
7417                 <links>
7418                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7419                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7420                 </links>
7421         </class>
7422         <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">
7423                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7424                         <field name="high" reporter:datatype="money" />
7425                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7426                         <field name="low" reporter:datatype="money" />
7427                         <field name="name" reporter:datatype="text"/>
7428                         <field name="normal" reporter:datatype="money" />
7429                         <field name="recurrence_interval" reporter:datatype="interval"/>
7430             <field name="grace_period" reporter:datatype="interval" />
7431                 </fields>
7432                 <links/>
7433         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7434             <actions>
7435                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7436                 <retrieve/>
7437                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7438                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7439             </actions>
7440         </permacrud>
7441         </class>
7442         <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">
7443                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7444                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7445                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7446                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7447                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7448                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7449                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7450                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7451                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7452                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7453                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7454                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7455                 </fields>
7456                 <links>
7457                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7458                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7459                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7460                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7461                 </links>
7462         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7463             <actions>
7464                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7465                     <context link="xact" jump="usr" field="home_ou"/>
7466                 </retrieve>
7467                         </actions>
7468                 </permacrud>
7469         </class>
7470         <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">
7471                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7472                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7473                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7474                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7475                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7476                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7477                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7478                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7479                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7480                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7481                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7482                 </fields>
7483                 <links>
7484                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7485                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7486                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7487                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7488                 </links>
7489         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7490             <actions>
7491                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7492                     <context link="xact" jump="usr" field="home_ou"/>
7493                 </retrieve>
7494                         </actions>
7495                 </permacrud>
7496         </class>
7497         <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">
7498                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7499                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7500                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7501                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7502                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7503                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7504                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7505                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7506                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7507                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7508                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7509                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7510                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7511                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7512                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7513                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7514                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7515                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7516                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7517                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7518                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7519                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7520                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7521                         <field reporter:label="Copy ID" name="id" reporter:selector="barcode" reporter:datatype="id"/>
7522                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7523                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7524                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7525                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7526                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7527                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7528                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7529                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7530                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7531                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7532                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7533                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7534                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7535                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7536                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7537                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7538                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7539                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7540                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7541                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7542                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7543                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7544                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7545                         <field reporter:label="Latest Inventory" name="latest_inventory" oils_persist:virtual="true" reporter:datatype="link"/>
7546                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7547                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7548                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7549                 </fields>
7550                 <links>
7551                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7552                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7553                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7554                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7555                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7556                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7557                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7558                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7559                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7560                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7561                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7562                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7563                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7564                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7565                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7566                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7567                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7568                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7569                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7570                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7571                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7572                         <link field="latest_inventory" reltype="might_have" key="copy" map="" class="alci"/>
7573                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7574                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7575                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7576                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7577                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7578                 </links>
7579         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7580             <actions>
7581                 <create permission="CREATE_COPY">
7582                     <context link="call_number" field="owning_lib"/>
7583                 </create>
7584                 <retrieve/>
7585                 <update permission="UPDATE_COPY">
7586                     <context link="call_number" field="owning_lib"/>
7587                 </update>
7588                 <delete permission="DELETE_COPY">
7589                     <context link="call_number" field="owning_lib"/>
7590                 </delete>
7591             </actions>
7592         </permacrud>
7593         </class>
7594
7595         <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">
7596                 <fields oils_persist:primary="id" oils_persist:sequence="asset.latest_inventory_id_seq">
7597             <field reporter:label="Latest Inventory ID" name="id" reporter:datatype="id"/>
7598                         <field reporter:label="Latest Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
7599                         <field reporter:label="Latest Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
7600                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
7601                 </fields>
7602                 <links>
7603                         <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
7604                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7605                 </links>
7606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7607             <actions>
7608                                 <create/>
7609                                 <retrieve/>
7610                                 <update/>
7611                                 <delete/>
7612             </actions>
7613         </permacrud>
7614         </class>
7615
7616         <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">
7617                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7618                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7619                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7620                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7621                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7622                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7623                         <field reporter:label="Event" name="event" reporter:datatype="text" />
7624                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
7625                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
7626                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
7627                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
7628                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
7629                 </fields>
7630                 <links>
7631                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
7632                 </links>
7633         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7634             <actions>
7635                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7636                 <retrieve/>
7637                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7638                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
7639             </actions>
7640         </permacrud>
7641         </class>
7642
7643         <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">
7644                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
7645                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7646                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
7647                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7648                 </fields>
7649                 <links>
7650                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7651                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7652                 </links>
7653         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7654             <actions>
7655                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7656                 <retrieve/>
7657                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7658                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
7659             </actions>
7660         </permacrud>
7661         </class>
7662
7663         <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">
7664                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
7665                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7666                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7667                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7668                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7669                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7670                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7671                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7672                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7673                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7674                 </fields>
7675                 <links>
7676                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7677                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7678                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7679                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7680                 </links>
7681         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7682             <actions>
7683                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
7684                     <context link="copy" field="circ_lib"/>
7685                 </create>
7686                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
7687                     <context link="copy" field="circ_lib"/>
7688                                 </retrieve>
7689                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
7690                     <context link="copy" field="circ_lib"/>
7691                                 </update>
7692                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
7693                     <context link="copy" field="circ_lib"/>
7694                                 </delete>
7695             </actions>
7696         </permacrud>
7697         </class>
7698
7699         <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">
7700                 <fields oils_persist:primary="id">
7701                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7702                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7703                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7704                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7705                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7706                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7707                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7708                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7709                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7710                 </fields>
7711                 <links>
7712                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7713                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7714                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7715                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7716                 </links>
7717         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7718             <actions>
7719                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
7720                     <context link="copy" field="circ_lib"/>
7721                 </create>
7722                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
7723                     <context link="copy" field="circ_lib"/>
7724                                 </retrieve>
7725                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
7726                     <context link="copy" field="circ_lib"/>
7727                                 </update>
7728                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
7729                     <context link="copy" field="circ_lib"/>
7730                                 </delete>
7731             </actions>
7732         </permacrud>
7733         </class>
7734
7735         <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">
7736                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7737                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7738                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7739                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7740                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7741                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7742                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7743                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7744                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7745                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7746                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7747                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7748                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7749                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7750                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7751                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7752                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7753                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7754                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7755                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7756                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7757                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7758                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7759                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7760                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7761                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7762                 </fields>
7763                 <links>
7764                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7765                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7766                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7767                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7768                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7769                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7770                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7771                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7772                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7773                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7774                 </links>
7775                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7776                         <actions>
7777                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7778                                 <retrieve />
7779                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7780                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7781                         </actions>
7782                 </permacrud>
7783         </class>
7784
7785         <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">
7786                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7787                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7788                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7789                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7790                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7791                 </fields>
7792                 <links/>
7793         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7794             <actions>
7795                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7796                 <retrieve/>
7797                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7798                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7799             </actions>
7800         </permacrud>
7801         </class>
7802         <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">
7803                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7804                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7805                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7806                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7807                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7808                 </fields>
7809                 <links/>
7810         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7811             <actions>
7812                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7813                 <retrieve/>
7814                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7815                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7816             </actions>
7817         </permacrud>
7818         </class>
7819         <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">
7820                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7821                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7822                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7823                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7824                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7825                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7826                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7827                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7828                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7829                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7830                 </fields>
7831                 <links>
7832                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7833                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7834                 </links>
7835         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7836             <actions>
7837                 <create permission="CREATE_PERM" global_required="true"/>
7838                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7839                 <update permission="UPDATE_PERM" global_required="true"/>
7840                 <delete permission="DELETE_PERM" global_required="true"/>
7841             </actions>
7842         </permacrud>
7843         </class>
7844         <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">
7845                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_display_entry_id_seq">
7846                         <field reporter:label="Entry ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7847                         <field reporter:label="Group ID" name="grp" reporter:datatype="link" oils_persist:i18n="true"/>
7848                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7849                         <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
7850                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7851                         <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7852                 </fields>
7853                 <links>
7854                         <link field="parent" reltype="has_a" key="id" map="" class="pgtde"/>
7855                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7856                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7857                         <link field="children" reltype="has_many" key="parent" map="" class="pgtde"/>
7858                 </links>
7859                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7860                         <actions>
7861                                 <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7862                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7863                                 <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7864                                 <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7865                         </actions>
7866                 </permacrud>
7867         </class>
7868         <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">
7869                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7870                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7871                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7872                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7873                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7874                 </fields>
7875                 <links>
7876                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7877                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7878                 </links>
7879         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7880             <actions>
7881                 <create permission="ADMIN_SURVEY">
7882                     <context link="question" jump="survey" field="owner"/>
7883                 </create>
7884                 <retrieve/>
7885                 <update permission="ADMIN_SURVEY">
7886                     <context link="question" jump="survey" field="owner"/>
7887                 </update>
7888                 <delete permission="ADMIN_SURVEY">
7889                     <context link="question" jump="survey" field="owner"/>
7890                 </delete>
7891             </actions>
7892         </permacrud>
7893         </class>
7894         <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">
7895                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7896                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7897                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7898                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7899                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7900                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7901                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7902                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7903                 </fields>
7904                 <links>
7905                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7906                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7907                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7908                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7909                 </links>
7910                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7911                         <actions>
7912                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7913                         </actions>
7914                 </permacrud>
7915         </class>
7916         <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">
7917                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7918                         <field name="balance_owed" reporter:datatype="money" />
7919                         <field name="total_owed" reporter:datatype="money" />
7920                         <field name="total_paid" reporter:datatype="money" />
7921                         <field name="usr" reporter:datatype="link"/>
7922                 </fields>
7923                 <links>
7924                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7925                 </links>
7926         </class>
7927         <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">
7928                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7929                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7930                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7931                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7932                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7933                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7934                 </fields>
7935                 <links>
7936                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7937                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7938                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7939                 </links>
7940         </class>
7941         <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">
7942                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7943                         <field name="field" reporter:datatype="link"/>
7944                         <field name="id" reporter:datatype="id" />
7945                         <field name="source" reporter:datatype="link"/>
7946                         <field name="value" reporter:datatype="text"/>
7947                 </fields>
7948                 <links>
7949                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7950                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7951                 </links>
7952         </class>
7953         <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">
7954                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7955                         <field name="field" reporter:datatype="link"/>
7956                         <field name="id" reporter:datatype="id" />
7957                         <field name="source" reporter:datatype="link"/>
7958                         <field name="value" reporter:datatype="text"/>
7959                 </fields>
7960                 <links>
7961                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7962                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7963                 </links>
7964         </class>
7965         <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">
7966                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7967                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7968                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7969                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7970                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7971                 </fields>
7972                 <links>
7973                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7974                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7975                 </links>
7976         </class>
7977         <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">
7978                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7979                         <field name="depth" reporter:datatype="int" />
7980                         <field name="grantable" reporter:datatype="bool"/>
7981                         <field name="grp" reporter:datatype="link"/>
7982                         <field name="id" reporter:datatype="id" />
7983                         <field name="perm" reporter:datatype="link"/>
7984                 </fields>
7985                 <links>
7986                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7987                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7988                 </links>
7989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7990             <actions>
7991                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7992                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7993                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7994                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7995             </actions>
7996         </permacrud>
7997         </class>
7998         <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">
7999                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
8000                         <field name="items" oils_persist:virtual="true" />
8001                         <field name="btype" reporter:datatype="text"/>
8002                         <field name="id" reporter:datatype="id" />
8003                         <field name="name" reporter:datatype="text"/>
8004                         <field name="description" reporter:datatype="text"/>
8005                         <field name="owner" reporter:datatype="link"/>
8006                         <field name="pub" reporter:datatype="bool"/>
8007                         <field name="create_time" reporter:datatype="timestamp" />
8008                         <field name="owning_lib" reporter:datatype="org_unit" />
8009                 </fields>
8010                 <links>
8011                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8012                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8013                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
8014                 </links>
8015                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8016                         <actions>
8017                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8018                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8019                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8020                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8021                         </actions>
8022                 </permacrud>
8023         </class>
8024         <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">
8025                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
8026                         <field name="id" reporter:datatype="id" />
8027                         <field name="bucket" reporter:datatype="link"/>
8028                         <field name="note" reporter:datatype="text" />
8029                 </fields>
8030                 <links>
8031                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
8032                 </links>
8033         </class>
8034         <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">
8035                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
8036                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
8037                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
8038                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
8039                 </fields>
8040                 <links>
8041                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8042                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
8043                 </links>
8044         </class>
8045         <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">
8046                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
8047                         <field name="depth" reporter:datatype="int"/>
8048                         <field name="grantable" reporter:datatype="bool"/>
8049                         <field name="id" reporter:datatype="id" />
8050                         <field name="perm" reporter:datatype="link"/>
8051                         <field name="usr" reporter:datatype="link"/>
8052                 </fields>
8053                 <links>
8054                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8055                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8056                 </links>
8057         </class>
8058         <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">
8059                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
8060                         <field name="object_id" reporter:datatype="text"/>
8061                         <field name="grantable" reporter:datatype="bool"/>
8062                         <field name="id" reporter:datatype="id" />
8063                         <field name="perm" reporter:datatype="link"/>
8064                         <field name="usr" reporter:datatype="link"/>
8065                         <field name="object_type" reporter:datatype="text"/>
8066                 </fields>
8067                 <links>
8068                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8069                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8070                 </links>
8071         </class>
8072         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:label="Payments">
8073                 <fields oils_persist:primary="id" oils_persist:sequence="">
8074                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8075                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8076                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8077                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8078                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8079                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8080                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8081                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8082                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8083                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8084                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8085                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8086                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8087                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8088                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8089                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8090                 </fields>
8091                 <links>
8092                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8093                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8094                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8095                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8096                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8097                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8098                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8099                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8100                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8101                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8102                 </links>
8103         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8104             <actions>
8105                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8106                     <context link="xact" jump="usr" field="home_ou"/>
8107                 </retrieve>
8108                         </actions>
8109                 </permacrud>
8110         </class>
8111         <class id="map" controller="open-ils.cstore open-ils.pcrud" 
8112                 oils_obj:fieldmapper="money::aged_payment" 
8113                 oils_persist:tablename="money.aged_payment" 
8114                 reporter:label="Payments: Aged">
8115                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8116                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8117                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8118                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8119                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8120                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8121                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8122                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8123                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8124                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8125                         <field name="billing" reporter:datatype="link"/>
8126                 </fields>
8127                 <links>
8128                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8129                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8130                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8131                         <link field="billing" reltype="has_a" key="id" class="mab"/>
8132                 </links>
8133                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8134                         <actions>
8135                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8136                                         <context link="xact" field="usr_home_ou"/>
8137                                 </retrieve>
8138                         </actions>
8139                 </permacrud>
8140         </class>
8141         <class id="mallp" controller="open-ils.cstore" 
8142                 oils_obj:fieldmapper="money::all_payments" 
8143                 oils_persist:tablename="money.all_payments" 
8144                 oils_persist="readonly" reporter:core="true"
8145                 reporter:label="Payments: All">
8146                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8147                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8148                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8149                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8150                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8151                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8152                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8153                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8154                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8155                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8156                         <field name="billing" reporter:datatype="link"/>
8157                 </fields>
8158                 <links>
8159                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8160                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8161                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8162                         <link field="billing" reltype="has_a" key="id" class="mallb"/>
8163                 </links>
8164         </class>
8165
8166         <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">
8167                 <fields oils_persist:primary="id" oils_persist:sequence="">
8168                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8169                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8170                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8171                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8172                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8173                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8174                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8175                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8176                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8177                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8178                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8179                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8180                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8181                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8182                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8183                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8184                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8185                 </fields>
8186                 <links>
8187                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8188                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8189                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8190                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8191                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8192                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8193                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8194                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8195                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8196                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8197                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8198                 </links>
8199                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8200                         <actions>
8201                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8202                                         <context link="xact" jump="usr" field="home_ou"/>
8203                                 </retrieve>
8204                         </actions>
8205                 </permacrud>
8206         </class>
8207         <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">
8208                 <fields oils_persist:primary="id" oils_persist:sequence="">
8209                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8210                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8211                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8212                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8213                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8214                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8215                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8216                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8217                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8218                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8219                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8220                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8221                 </fields>
8222                 <links>
8223                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8224                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8225                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8226                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8227                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8228                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8229                 </links>
8230         </class>
8231         <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">
8232                 <fields oils_persist:primary="id" oils_persist:sequence="">
8233                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8234                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8235                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8236                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8237                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8238                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8239                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8240                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8241                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8242                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8243                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8244                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8245                         <field reporter:label="Debit Card Payment" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8246                 </fields>
8247                 <links>
8248                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8249                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8250                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8251                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8252                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8253                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8254                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8255                 </links>
8256         </class>
8257         <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">
8258                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
8259                         <field name="bucket" reporter:datatype="link"/>
8260                         <field name="id" reporter:datatype="id" />
8261                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
8262                         <field name="create_time" reporter:datatype="timestamp" />
8263                         <field name="pos" reporter:datatype="int" />
8264                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8265                 </fields>
8266                 <links>
8267                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
8268                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
8269             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
8270                 </links>
8271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8272                         <actions>
8273                                 <retrieve permission="ADMIN_COPY_BUCKET">
8274                     <context link="bucket" owning_lib="owning_lib"/>
8275                 </retrieve>
8276             </actions>
8277         </permacrud>
8278         </class>
8279         <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">
8280                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
8281                         <field name="id" reporter:datatype="id" />
8282                         <field name="item" reporter:datatype="link"/>
8283                         <field name="note" reporter:datatype="text" />
8284                 </fields>
8285                 <links>
8286                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8287                 </links>
8288         </class>
8289         <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">
8290                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8291                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8292                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8293                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8294                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8295                 </fields>
8296                 <links>
8297                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8298                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8299                 </links>
8300                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8301                         <actions>
8302                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8303                         </actions>
8304                 </permacrud>
8305         </class>
8306     <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">
8307         <fields oils_persist:primary="field">
8308             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8309             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8310             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8311         </fields>
8312         <links/>
8313         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8314             <actions>
8315                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8316                 <retrieve />
8317                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8318                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8319             </actions>
8320         </permacrud>
8321     </class>
8322         <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">
8323                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8324                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8325                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8326                 </fields>
8327                 <links/>
8328         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8329             <actions>
8330                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8331                 <retrieve/>
8332                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8333                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8334             </actions>
8335         </permacrud>
8336         </class>
8337
8338
8339         <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">
8340                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8341                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8342                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8343                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8344                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8345                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8346                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8347                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8348                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8349                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8350                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8351                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8352                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8353                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8354                 </fields>
8355                 <links>
8356                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8357                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8358                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8359                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8360                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8361                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8362                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8363                 </links>
8364         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8365             <actions>
8366                 <create permission="TRANSIT_COPY">
8367                     <context link="target_copy" field="owner"/>
8368                 </create>
8369                 <retrieve/>
8370                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8371                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8372             </actions>
8373         </permacrud>
8374         </class>
8375         <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">
8376                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8377                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8378                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8379                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8380                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8381                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8382                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8383                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8384                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8385                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8386                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8387                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8388                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8389                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8390                 </fields>
8391                 <links>
8392                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8393                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8394                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8395                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8396                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8397                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8398                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8399                 </links>
8400         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8401             <actions>
8402                 <create permission="TRANSIT_COPY" context_field="owner">
8403                     <context link="target_copy" field="circ_lib"/>
8404                 </create>
8405                 <retrieve/>
8406                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8407                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8408             </actions>
8409         </permacrud>
8410         </class>
8411         <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">
8412                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8413                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8414                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8415                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8416                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8417                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8418                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8419                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8420                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8421                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8422                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8423                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8424                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8425                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8426                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8427                 </fields>
8428                 <links>
8429                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8430                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8431                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8432                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8433                 </links>
8434         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8435             <actions>
8436                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8437                     <context link="xact" jump="usr" field="home_ou"/>
8438                 </retrieve>
8439                         </actions>
8440                 </permacrud>
8441         </class>
8442         <class id="mab" controller="open-ils.cstore open-ils.pcrud" 
8443                 oils_obj:fieldmapper="money::aged_billing" 
8444                 oils_persist:tablename="money.aged_billing" 
8445                 reporter:label="Aged Billing Line Item">
8446                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8447                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8448                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8449                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8450                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8451                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8452                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8453                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8454                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8455                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8456                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8457                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8458                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8459                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8460                 </fields>
8461                 <links>
8462                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8463                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8464                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8465                 </links>
8466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8467                         <actions>
8468                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8469                                         <context link="xact" field="usr_home_ou"/>
8470                                 </retrieve>
8471                         </actions>
8472                 </permacrud>
8473         </class>
8474         <class id="mallb" controller="open-ils.cstore" 
8475                 oils_obj:fieldmapper="money::all_billings" 
8476                 oils_persist:tablename="money.all_billings" 
8477                 oils_persist="readonly" reporter:label="All Billing Line Items">
8478                 <fields oils_persist:primary="id" oils_persist:sequence="">
8479                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8480                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8481                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8482                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8483                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8484                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8485                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8486                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8487                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8488                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8489                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8490                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8491                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8492                 </fields>
8493                 <links>
8494                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8495                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8496                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8497                 </links>
8498         </class>
8499         <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">
8500                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8501                         <field name="grp" />
8502                         <field name="id" reporter:datatype="id" />
8503                         <field name="usr" />
8504                 </fields>
8505                 <links>
8506                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8507                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8508                 </links>
8509         </class>
8510         <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">
8511                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8512                         <field name="id" reporter:datatype="id" />
8513                         <field name="fq_field" reporter:datatype="text"/>
8514                         <field name="identity_value" reporter:datatype="text"/>
8515                         <field name="translation" reporter:datatype="text"/>
8516                         <field name="string" reporter:datatype="text"/>
8517                 </fields>
8518                 <links>
8519                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8520                 </links>
8521         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8522             <actions>
8523                 <create permission="CREATE_TRANSLATION" global_required="true"/>
8524                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8525                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8526                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8527             </actions>
8528         </permacrud>
8529         </class>
8530         <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">
8531                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8532                         <field name="id" reporter:datatype="id" />
8533                         <field name="fm_class" reporter:datatype="text"/>
8534                         <field name="field" reporter:datatype="text"/>
8535                         <field name="owner" reporter:datatype="org_unit"/>
8536                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8537                 </fields>
8538                 <links>
8539                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8540                 </links>
8541         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8542             <actions>
8543                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8544                 <retrieve/>
8545                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8546                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8547             </actions>
8548         </permacrud>
8549         </class>
8550         <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">
8551                 <fields oils_persist:primary="code">
8552                         <field name="code" reporter:datatype="id" />
8553                         <field name="marc_code" reporter:datatype="text"/>
8554                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8555                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8556                         <field name="rtl" reporter:datatype="bool"/>
8557                 </fields>
8558                 <links/>
8559         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8560             <actions>
8561                 <create permission="CREATE_LOCALE" global_required="true"/>
8562                 <retrieve/>
8563                 <update permission="UPDATE_LOCALE" global_required="true"/>
8564                 <delete permission="DELETE_LOCALE" global_required="true"/>
8565             </actions>
8566         </permacrud>
8567         </class>
8568         <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">
8569                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8570                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name" oils_obj:required="true"/>
8571                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true" oils_obj:required="true"/>
8572                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" oils_obj:required="true"/>
8573                         <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8574                 </fields>
8575                 <links>
8576                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8577                 </links>
8578         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8579             <actions>
8580                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8581                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8582                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8583                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8584             </actions>
8585         </permacrud>
8586         </class>
8587
8588         <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">
8589                 <fields oils_persist:primary="id">
8590                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8591                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8592                 </fields>
8593                 <links/>
8594         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8595             <actions>
8596                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8597                 <retrieve/>
8598                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8599                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8600             </actions>
8601         </permacrud>
8602         </class>
8603
8604         <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">
8605                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8606                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8607                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8608                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8609                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8610                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8611                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8612                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8613                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8614                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8615                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8616                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8617                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8618                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8619                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8620                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8621                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8622                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8623                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8624                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8625                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8626                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8627                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8628                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8629                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8630                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8631                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8632                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8633                 </fields>
8634                 <links>
8635                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8636                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8637                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8638                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8639                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8640                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8641                 </links>
8642         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8643             <actions>
8644                 <create permission="user_request.create">
8645                     <context link="usr" field="home_ou"/>
8646                                 </create>
8647                 <retrieve permission="user_request.view">
8648                     <context link="usr" field="home_ou"/>
8649                                 </retrieve>
8650                 <update permission="user_request.update">
8651                     <context link="usr" field="home_ou"/>
8652                                 </update>
8653                 <delete permission="user_request.delete">
8654                     <context link="usr" field="home_ou"/>
8655                                 </delete>
8656             </actions>
8657         </permacrud>
8658         </class>
8659
8660         <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">
8661         <oils_persist:source_definition><![CDATA[
8662             SELECT r.*, CASE
8663                         WHEN r.cancel_reason IS NOT NULL THEN 7 -- Canceled
8664                         WHEN h.fulfillment_time IS NOT NULL THEN 6 -- Fulfilled
8665                         WHEN l.state = 'received' THEN 5 -- Received
8666                         WHEN p.state = 'on-order' AND h.id IS NOT NULL THEN 4 -- Ordered, Hold Placed
8667                         WHEN p.state = 'on-order' AND h.id IS NULL THEN 3 -- Ordered, Hold Not Placed
8668                         WHEN l.id IS NOT NULL THEN 2 -- Pending
8669                         WHEN l.id IS NULL THEN 1 -- New
8670                         ELSE 0 -- Error
8671                     END AS request_status
8672                     ,u.home_ou
8673             FROM      acq.user_request r
8674             JOIN actor.usr u ON (r.usr = u.id)
8675             LEFT JOIN acq.lineitem l ON (r.lineitem = l.id)
8676             LEFT JOIN acq.purchase_order p ON (l.purchase_order = p.id)
8677             LEFT JOIN action.hold_request h ON (h.acq_request = r.id)
8678         ]]></oils_persist:source_definition>
8679                 <fields oils_persist:primary="id">
8680                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8681                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8682                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8683                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8684                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8685                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8686                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8687                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8688                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8689                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8690                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8691                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8692                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8693                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8694                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8695                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8696                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8697                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8698                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8699                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8700                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8701                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8702                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8703                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8704                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8705                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8706                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8707                         <field reporter:label="Request Status" name="request_status" reporter:datatype="link" />
8708                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="link"/>
8709                 </fields>
8710                 <links>
8711                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8712                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8713                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8714                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8715                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8716                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8717                         <link field="request_status" reltype="has_a" key="id" map="" class="aurst"/>
8718                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8719                 </links>
8720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8721             <actions>
8722                 <retrieve permission="user_request.view">
8723                     <context link="usr" field="home_ou"/>
8724                                 </retrieve>
8725             </actions>
8726         </permacrud>
8727         </class>
8728
8729         <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">
8730                 <fields oils_persist:primary="id">
8731                         <field reporter:label="Status ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8732                         <field reporter:label="Status" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8733                 </fields>
8734                 <links/>
8735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8736             <actions>
8737                 <retrieve/>
8738             </actions>
8739         </permacrud>
8740         </class>
8741
8742         <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">
8743                 <fields oils_persist:primary="code">
8744                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
8745                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8746                 </fields>
8747                 <links/>
8748         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8749             <actions>
8750                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8751                 <retrieve/>
8752                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8753                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8754             </actions>
8755         </permacrud>
8756         </class>
8757
8758         <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">
8759                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
8760                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
8761                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
8762                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
8763                         <field reporter:label="Ratio" name="ratio" />
8764                 </fields>
8765                 <links>
8766                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
8767                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
8768                 </links>
8769                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8770                         <actions>
8771                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8772                                 <retrieve/>
8773                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8774                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8775                         </actions>
8776                 </permacrud>
8777         </class>
8778
8779         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
8780                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
8781                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8782                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8783                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8784                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8785                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8786                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
8787                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
8788                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
8789                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
8790                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8791                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8792                         <field reporter:label="URL" name="url" reporter:datatype="text" />
8793                         <field reporter:label="Email" name="email" reporter:datatype="text" />
8794                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
8795                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
8796                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
8797                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
8798                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
8799                 </fields>
8800                 <links>
8801                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8802                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8803             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
8804             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
8805                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
8806                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
8807                 </links>
8808         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8809             <actions>
8810                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
8811                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
8812                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
8813                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
8814             </actions>
8815         </permacrud>
8816         </class>
8817
8818         <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">
8819                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
8820                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8821                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8822                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8823                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8824                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8825                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8826                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8827                 </fields>
8828                 <links>
8829                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8830                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8831                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8832                 </links>
8833         </class>
8834
8835         <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">
8836                 <fields oils_persist:primary="code">
8837                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
8838                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8839                 </fields>
8840                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8841             <actions>
8842                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8843                 <retrieve/>
8844                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8845                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8846             </actions>
8847                 </permacrud>
8848         </class>
8849
8850         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
8851                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
8852                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
8853                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
8854                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8855                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
8856                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
8857                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
8858                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
8859                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
8860                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
8861                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
8862                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8863                         <field reporter:label="Close Date" name="close_date" reporter:datatype="timestamp" />
8864                         <field reporter:label="Closed By" name="closed_by" reporter:datatype="link" />
8865                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
8866                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
8867                 </fields>
8868                 <links>
8869                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
8870                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8871                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
8872                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
8873                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
8874                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
8875                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
8876                         <link field="closed_by" reltype="has_a" key="id" map="" class="au"/>
8877                 </links>
8878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8879             <actions>
8880                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
8881                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
8882                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
8883                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
8884             </actions>
8885         </permacrud>
8886         </class>
8887
8888         <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">
8889                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
8890                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8891                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8892                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8893                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
8894                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
8895                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
8896                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8897                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
8898                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8899                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8900                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8901                 </fields>
8902                 <links>
8903                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8904                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8905                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8906                 </links>
8907         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8908             <actions>
8909                 <create   permission="ADMIN_INVOICE">
8910                                         <context link="invoice" field="receiver"/>
8911                                 </create>
8912                 <retrieve permission="ADMIN_INVOICE">
8913                                         <context link="invoice" field="receiver"/>
8914                                 </retrieve>
8915                 <update   permission="ADMIN_INVOICE">
8916                                         <context link="invoice" field="receiver"/>
8917                                 </update>
8918                                 <delete   permission="ADMIN_INVOICE">
8919                                         <context link="invoice" field="receiver"/>
8920                                 </delete>
8921             </actions>
8922         </permacrud>
8923         </class>
8924
8925         <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">
8926                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
8927                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8928                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8929                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8930                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8931                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
8932                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
8933                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8934                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8935                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8936                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8937                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8938                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8939                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
8940                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8941                 </fields>
8942                 <links>
8943                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8944                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8945                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8946                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8947                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8948                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8949                 </links>
8950         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8951             <actions>
8952                 <create   permission="ADMIN_INVOICE">
8953                                         <context link="invoice" field="receiver"/>
8954                                 </create>
8955                 <retrieve permission="ADMIN_INVOICE">
8956                                         <context link="invoice" field="receiver"/>
8957                                 </retrieve>
8958                 <update   permission="ADMIN_INVOICE">
8959                                         <context link="invoice" field="receiver"/>
8960                                 </update>
8961                                 <delete   permission="ADMIN_INVOICE">
8962                                         <context link="invoice" field="receiver"/>
8963                                 </delete>
8964             </actions>
8965         </permacrud>
8966         </class>
8967
8968         <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">
8969                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8970                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8971                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8972                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8973                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8974                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8975                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8976                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8977                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8978                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8979                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8980                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8981                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8982                 </fields>
8983                 <links>
8984                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8985                 </links>
8986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8987             <actions>
8988                 <create permission="ADMIN_PROVIDER">
8989                     <context link="provider" field="owner"/>
8990                 </create>
8991                 <retrieve permission="ADMIN_PROVIDER">
8992                     <context link="provider" field="owner"/>
8993                 </retrieve>
8994                 <update permission="ADMIN_PROVIDER">
8995                     <context link="provider" field="owner"/>
8996                 </update>
8997                 <delete permission="ADMIN_PROVIDER">
8998                     <context link="provider" field="owner"/>
8999                 </delete>
9000             </actions>
9001         </permacrud>
9002         </class>
9003
9004         <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">
9005                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
9006                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9007                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9008                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9009                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
9010                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
9011                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
9012         </fields>
9013                 <links>
9014                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9015                 </links>
9016         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9017             <actions>
9018                 <create permission="ADMIN_PROVIDER">
9019                     <context link="provider" field="owner"/>
9020                 </create>
9021                 <retrieve permission="ADMIN_PROVIDER">
9022                     <context link="provider" field="owner"/>
9023                 </retrieve>
9024                 <update permission="ADMIN_PROVIDER">
9025                     <context link="provider" field="owner"/>
9026                 </update>
9027                 <delete permission="ADMIN_PROVIDER">
9028                     <context link="provider" field="owner"/>
9029                 </delete>
9030             </actions>
9031         </permacrud>
9032     </class>
9033         <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">
9034                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
9035                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
9036                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
9037                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
9038                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9039                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
9040                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9041                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
9042                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
9043                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
9044                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
9045                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
9046                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9047                 </fields>
9048                 <links>
9049                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
9050                 </links>
9051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9052             <actions>
9053                 <create permission="ADMIN_PROVIDER">
9054                     <context link="contact" jump='provider' field="owner"/>
9055                 </create>
9056                 <retrieve permission="ADMIN_PROVIDER">
9057                     <context link="contact" jump='provider' field="owner"/>
9058                 </retrieve>
9059                 <update permission="ADMIN_PROVIDER">
9060                     <context link="contact" jump='provider' field="owner"/>
9061                 </update>
9062                 <delete permission="ADMIN_PROVIDER">
9063                     <context link="contact" jump='provider' field="owner"/>
9064                 </delete>
9065             </actions>
9066         </permacrud>
9067         </class>
9068
9069         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
9070                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
9071                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
9072                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
9073                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
9074                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
9075                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
9076                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
9077                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
9078                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9079                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
9080                 </fields>
9081                 <links>
9082                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
9083                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
9084                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
9085                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9086                 </links>
9087         </class>
9088
9089         <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">
9090                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
9091                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9092                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
9093                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
9094                 </fields>
9095                 <links>
9096             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
9097                 </links>
9098                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9099                         <actions>
9100                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9101                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9102                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9103                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9104                         </actions>
9105                 </permacrud>
9106         </class>
9107
9108         <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">
9109                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
9110                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
9111                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
9112                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
9113                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
9114                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
9115                 </fields>
9116                 <links>
9117                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
9118                 </links>
9119                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9120                         <actions>
9121                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9122                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9123                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9124                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9125                         </actions>
9126                 </permacrud>
9127         </class>
9128
9129         <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">
9130                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
9131                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9132                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9133                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
9134                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
9135                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9136                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9137                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9138                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
9139                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
9140                 </fields>
9141                 <links>
9142                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9143                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9144             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
9145             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
9146                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
9147                 </links>
9148         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9149             <actions>
9150                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9151                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
9152                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9153                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9154             </actions>
9155         </permacrud>
9156         </class>
9157
9158         <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">
9159                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
9160                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
9161                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
9162                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9163                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9164                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
9165                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
9166                 </fields>
9167                 <links>
9168                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9169                 </links>
9170                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9171                         <actions>
9172                                 <create permission="ADMIN_FUNDING_SOURCE">
9173                     <context link="funding_source" field="owner"/>
9174                 </create>
9175                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
9176                     <context link="funding_source" field="owner"/>
9177                 </retrieve>
9178                                 <update permission="ADMIN_FUNDING_SOURCE">
9179                     <context link="funding_source" field="owner"/>
9180                 </update>
9181                                 <delete permission="ADMIN_FUNDING_SOURCE">
9182                     <context link="funding_source" field="owner"/>
9183                 </delete>
9184                         </actions>
9185                 </permacrud>
9186         </class>
9187
9188         <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">
9189                 <fields oils_persist:primary="id">
9190                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
9191                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
9192                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
9193                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
9194                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
9195                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9196                 </fields>
9197                 <links>
9198                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9199                 </links>
9200         </class>
9201
9202         <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">
9203                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
9204                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
9205                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9206                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
9207                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
9208                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9209                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
9210                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
9211                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9212                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
9213                 </fields>
9214                 <links>
9215                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9216                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9217                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
9218                 </links>
9219                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9220                         <actions>
9221                                 <create permission="ADMIN_ACQ_FUND">
9222                     <context link="fund" field="org"/>
9223                 </create>
9224                                 <retrieve permission="ADMIN_ACQ_FUND">
9225                     <context link="fund" field="org"/>
9226                 </retrieve>
9227                                 <update permission="ADMIN_ACQ_FUND">
9228                     <context link="fund" field="org"/>
9229                 </update>
9230                                 <delete permission="ADMIN_ACQ_FUND">
9231                     <context link="fund" field="org"/>
9232                 </delete>
9233                         </actions>
9234                 </permacrud>
9235         </class>
9236
9237         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
9238                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9239                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9240                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9241                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9242                         <field reporter:label="Year" name="year" reporter:datatype="int" />
9243                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9244                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9245                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9246                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9247                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9248                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9249                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9250                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9251                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9252                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
9253                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
9254                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
9255                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
9256                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
9257                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
9258                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9259                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9260                 </fields>
9261                 <links>
9262                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9263                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9264             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
9265             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
9266             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
9267             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
9268             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
9269             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
9270             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
9271             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
9272             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
9273                 </links>
9274         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
9275             <actions>
9276                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
9277                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9278                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
9279                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
9280             </actions>
9281         </permacrud>
9282         </class>
9283
9284         <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">
9285                 <fields oils_persist:primary="fund">
9286                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9287                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9288                 </fields>
9289                 <links>
9290                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9291                 </links>
9292         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9293             <actions>
9294                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9295                                         <context link="fund" field="org" />
9296                 </retrieve>
9297             </actions>
9298         </permacrud>
9299         </class>
9300
9301         <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">
9302                 <fields oils_persist:primary="fund">
9303                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9304                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
9305                 </fields>
9306                 <links>
9307                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9308                 </links>
9309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9310             <actions>
9311                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9312                                         <context link="fund" field="org" />
9313                 </retrieve>
9314             </actions>
9315         </permacrud>
9316         </class>
9317
9318         <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">
9319                 <fields oils_persist:primary="fund">
9320                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9321                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
9322                 </fields>
9323                 <links>
9324                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9325                 </links>
9326         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9327             <actions>
9328                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9329                                         <context link="fund" field="org" />
9330                 </retrieve>
9331             </actions>
9332         </permacrud>
9333         </class>
9334
9335         <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">
9336                 <fields oils_persist:primary="fund">
9337                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9338                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9339                 </fields>
9340                 <links>
9341                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9342                 </links>
9343         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9344             <actions>
9345                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9346                                         <context link="fund" field="org" />
9347                 </retrieve>
9348             </actions>
9349         </permacrud>
9350         </class>
9351
9352         <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">
9353                 <fields oils_persist:primary="fund">
9354                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9355                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
9356                 </fields>
9357                 <links>
9358                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9359                 </links>
9360         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9361             <actions>
9362                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9363                                         <context link="fund" field="org" />
9364                 </retrieve>
9365             </actions>
9366         </permacrud>
9367         </class>
9368
9369    <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">
9370         <fields oils_persist:primary="fund">
9371             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9372             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9373         </fields>
9374         <links>
9375             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9376         </links>
9377     </class>
9378
9379    <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">
9380         <fields oils_persist:primary="fund">
9381             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9382             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
9383         </fields>
9384         <links>
9385             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9386         </links>
9387     </class>
9388
9389    <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">
9390         <fields oils_persist:primary="fund">
9391             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9392             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9393         </fields>
9394         <links>
9395             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9396         </links>
9397     </class>
9398
9399    <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">
9400         <fields oils_persist:primary="fund">
9401             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9402             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
9403         </fields>
9404         <links>
9405             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9406         </links>
9407     </class>
9408
9409    <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">
9410         <fields oils_persist:primary="fund">
9411             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9412             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
9413         </fields>
9414         <links>
9415             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9416         </links>
9417     </class>
9418
9419         <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">
9420                 <fields oils_persist:primary="funding_source">
9421                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9422                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
9423                 </fields>
9424                 <links>
9425                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9426                 </links>
9427         </class>
9428
9429         <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">
9430                 <fields oils_persist:primary="funding_source">
9431                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9432                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
9433                 </fields>
9434                 <links>
9435                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9436                 </links>
9437         </class>
9438
9439         <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">
9440                 <fields oils_persist:primary="funding_source">
9441                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9442                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
9443                 </fields>
9444                 <links>
9445                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9446                 </links>
9447         </class>
9448
9449         <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">
9450                 <fields oils_persist:primary="fund">
9451                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9452                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9453                 </fields>
9454                 <links>
9455                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9456                 </links>
9457         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9458             <actions>
9459                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9460                                         <context link="fund" field="org" />
9461                 </retrieve>
9462             </actions>
9463         </permacrud>
9464     </class>
9465     <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">
9466         <oils_persist:source_definition><![CDATA[
9467             SELECT
9468                 acqf.*,
9469                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9470                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9471                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9472                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9473             FROM
9474                 acq.fund acqf
9475                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9476                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9477                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
9478                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
9479         ]]></oils_persist:source_definition>
9480         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9481             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9482             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9483             <field reporter:label="Name" name="name" reporter:datatype="text" />
9484             <field reporter:label="Year" name="year" reporter:datatype="int" />
9485             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9486             <field reporter:label="Code" name="code" reporter:datatype="text" />
9487             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9488             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9489             <field reporter:label="Active" name="active" reporter:datatype="bool" />
9490             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9491             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9492
9493             <!-- non fund-native fields -->
9494             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
9495             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
9496             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
9497             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
9498         </fields>
9499         <links>
9500             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
9501             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9502             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9503         </links>
9504         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9505             <actions>
9506                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9507             </actions>
9508         </permacrud>
9509         </class>
9510         <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">
9511                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
9512                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9513                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9514                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9515                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9516                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9517                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9518                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9519                 </fields>
9520                 <links>
9521                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9522                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9523                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9524                 </links>
9525                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9526                         <actions>
9527                                 <create permission="ADMIN_ACQ_FUND">
9528                     <context link="fund" field="org"/>
9529                 </create>
9530                                 <retrieve permission="ADMIN_ACQ_FUND">
9531                     <context link="fund" field="org"/>
9532                 </retrieve>
9533                                 <update permission="ADMIN_ACQ_FUND">
9534                     <context link="fund" field="org"/>
9535                 </update>
9536                                 <delete permission="ADMIN_ACQ_FUND">
9537                     <context link="fund" field="org"/>
9538                 </delete>
9539                         </actions>
9540                 </permacrud>
9541         </class>
9542
9543     <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">
9544         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
9545             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9546             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9547             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9548             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
9549             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
9550             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9551             <field reporter:label="Note" name="note" reporter:datatype="text" />
9552             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9553         </fields>
9554         <links>
9555             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9556             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9557             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9558         </links>
9559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9560                         <actions>
9561                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9562                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9563                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9564                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9565                         </actions>
9566                 </permacrud>
9567     </class>
9568
9569         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
9570                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
9571                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
9572                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9573                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
9574                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9575                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9576                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9577                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
9578                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
9579                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9580                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9581                 </fields>
9582                 <links>
9583                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9584                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9585                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9586                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9587                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
9588                 </links>
9589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9590                         <actions>
9591                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
9592                         </actions>
9593                 </permacrud>
9594         </class>
9595
9596         <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">
9597                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
9598                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9599                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
9600                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9601                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9602                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
9603                 </fields>
9604                 <links>
9605                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9606                 </links>
9607                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9608                         <actions>
9609                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9610                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
9611                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9612                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9613                         </actions>
9614                 </permacrud>
9615         </class>
9616
9617         <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">
9618                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
9619                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9620                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9621                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9622                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9623                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9624                         <field reporter:label="State" name="state" reporter:datatype="text" />
9625                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
9626                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9627                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9628                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
9629                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9630                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9631                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9632                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
9633                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
9634                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
9635                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
9636                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
9637                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
9638                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9639                 </fields>
9640                 <links>
9641                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9642                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9643                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9644                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
9645                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9646                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
9647                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
9648                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
9649                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9650                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9651                 </links>
9652                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9653                         <actions>
9654                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9655                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9656                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9657                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9658                         </actions>
9659                 </permacrud>
9660         </class>
9661
9662         <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">
9663                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
9664                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9665                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9666                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9667                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
9668                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9669                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9670                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9671                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9672                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9673                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9674                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9675                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9676                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
9677                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9678                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9679                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9680                 </fields>
9681                 <links>
9682                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
9683                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9684                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9685                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9686                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9687                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9688                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9689                 </links>
9690                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9691             <actions>
9692                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9693             </actions>
9694                 </permacrud>
9695         </class>
9696
9697         <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">
9698                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
9699                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9700                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9701                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9702                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9703                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9704                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9705                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
9706                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9707                 </fields>
9708                 <links>
9709                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9710                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9711                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9712                 </links>
9713                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9714             <actions>
9715                 <create permission="CREATE_PURCHASE_ORDER">
9716                     <context link="purchase_order" field="ordering_agency"/>
9717                 </create>
9718                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9719                     <context link="purchase_order" field="ordering_agency"/>
9720                 </retrieve>
9721                 <update permission="CREATE_PURCHASE_ORDER">
9722                     <context link="purchase_order" field="ordering_agency"/>
9723                 </update>
9724                 <delete permission="CREATE_PURCHASE_ORDER">
9725                     <context link="purchase_order" field="ordering_agency"/>
9726                 </delete>
9727             </actions>
9728                 </permacrud>
9729         </class>
9730
9731         <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">
9732                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
9733                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9734                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9735                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9736                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
9737                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
9738                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
9739                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9740                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
9741                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9742                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9743                 </fields>
9744                 <links>
9745                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9746                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9747                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9748                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9749                 </links>
9750                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9751             <actions>
9752                 <create permission="CREATE_PURCHASE_ORDER">
9753                     <context link="purchase_order" field="ordering_agency"/>
9754                 </create>
9755                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9756                     <context link="purchase_order" field="ordering_agency"/>
9757                 </retrieve>
9758                 <update permission="CREATE_PURCHASE_ORDER">
9759                     <context link="purchase_order" field="ordering_agency"/>
9760                 </update>
9761                 <delete permission="CREATE_PURCHASE_ORDER">
9762                     <context link="purchase_order" field="ordering_agency"/>
9763                 </delete>
9764             </actions>
9765                 </permacrud>
9766         </class>
9767
9768         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
9769                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
9770                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
9771                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
9772                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
9773                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9774                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9775                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9776                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9777                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
9778                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
9779                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
9780                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
9781                         <field reporter:label="State" name="state" reporter:datatype="text" />
9782                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9783                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9784                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
9785                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9786                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9787                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9788                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
9789                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9790                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9791                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
9792                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
9793                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
9794                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
9795                 </fields>
9796                 <links>
9797                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9798                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9799                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9800                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9801                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9802                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9803                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9804                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
9805                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
9806                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
9807                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9808                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
9809                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9810                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
9811                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
9812                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9813                 </links>
9814                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9815                         <actions>
9816                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
9817                                         <context link="purchase_order" field="ordering_agency"/>
9818                                         <context link="picklist" field="org_unit"/>
9819                                 </retrieve>
9820                         </actions>
9821                 </permacrud>
9822         </class>
9823
9824         <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">
9825                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
9826                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9827                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9828                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9829                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
9830                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9831                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9832                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
9833                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9834                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9835                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
9836                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
9837                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9838                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9839                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
9840                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
9841                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
9842                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9843                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
9844                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9845                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9846                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9847                 </fields>
9848                 <links>
9849                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
9850                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9851                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9852                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9853                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9854                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9855                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9856                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9857                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9858                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9859                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9860                 </links>
9861                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9862                         <actions>
9863                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9864                                         <context link="purchase_order" field="ordering_agency"/>
9865                                         <context link="picklist" field="org_unit"/>
9866                                 </retrieve>
9867                         </actions>
9868                 </permacrud>
9869         </class>
9870
9871         <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">
9872                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
9873                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
9874                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9875                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9876                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9877                 </fields>
9878                 <links>
9879                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9880                 </links>
9881                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9882                         <actions>
9883                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9884                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
9885                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9886                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9887                         </actions>
9888                 </permacrud>
9889         </class>
9890
9891         <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">
9892                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
9893                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
9894                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
9895                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9896                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9897                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9898                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9899                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9900                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
9901                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9902                 </fields>
9903                 <links>
9904                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9905                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9906                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9907                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
9908                 </links>
9909         </class>
9910
9911         <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">
9912                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
9913                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
9914                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
9915                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
9916                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
9917                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
9918                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
9919                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
9920                 </fields>
9921                 <links>
9922                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9923                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
9924                 </links>
9925         </class>
9926
9927         <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">
9928                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
9929                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
9930                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9931                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
9932                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
9933                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
9934                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
9935                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
9936                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9937                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
9938                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9939                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
9940                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
9941                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9942                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
9943                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9944                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9945                 </fields>
9946                 <links>
9947                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9948                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9949                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9950                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9951                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9952                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9953                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9954                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9955                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9956                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9957                 </links>
9958         </class>
9959
9960         <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">
9961                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9962                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9963                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9964                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9965                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9966                 </fields>
9967                 <links/>
9968                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9969                         <actions>
9970                                 <retrieve />
9971                         </actions>
9972                 </permacrud>
9973         </class>
9974
9975         <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">
9976                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9977                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9978                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9979                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9980                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9981                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9982             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9983                 </fields>
9984                 <links/>
9985         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9986             <actions>
9987                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9988                 <retrieve />
9989                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9990                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9991             </actions>
9992         </permacrud>
9993         </class>
9994
9995         <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">
9996                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9997                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9998                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9999                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10000                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10001                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10002                 </fields>
10003                 <links/>
10004         </class>
10005         <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">
10006                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10007                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10008                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10009                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10010                         <field reporter:label="User" name="usr" reporter:datatype="link" />
10011                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10012                 </fields>
10013                 <links>
10014                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10015                 </links>
10016         </class>
10017
10018         <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">
10019             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10020                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10021                 <field reporter:label="Code" name="code" reporter:datatype="text" />
10022                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10023                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10024                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10025                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10026         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
10027
10028             </fields>
10029             <links>
10030                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10031             </links>
10032             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10033                 <actions>
10034                     <create permission="ADMIN_PROVIDER">
10035                         <context link="provider" field="owner"/>
10036                     </create>
10037                     <retrieve permission="ADMIN_PROVIDER">
10038                         <context link="provider" field="owner"/>
10039                     </retrieve>
10040                     <update permission="ADMIN_PROVIDER">
10041                         <context link="provider" field="owner"/>
10042                     </update>
10043                     <delete permission="ADMIN_PROVIDER">
10044                         <context link="provider" field="owner"/>
10045                     </delete>
10046                 </actions>
10047             </permacrud>
10048         </class>
10049         
10050         <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">
10051             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
10052                 <field reporter:label="ID" name="id" reporter:datatype="id" />
10053                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10054                 <field reporter:label="Name" name="name" reporter:datatype="text" />
10055                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
10056             </fields>
10057             <links>
10058                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10059             </links>
10060             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10061                 <actions>
10062                     <create permission="ADMIN_PROVIDER">
10063                         <context link="provider" field="owner"/>
10064                     </create>
10065                     <retrieve permission="ADMIN_PROVIDER">
10066                         <context link="provider" field="owner"/>
10067                     </retrieve>
10068                     <update permission="ADMIN_PROVIDER">
10069                         <context link="provider" field="owner"/>
10070                     </update>
10071                     <delete permission="ADMIN_PROVIDER">
10072                         <context link="provider" field="owner"/>
10073                     </delete>
10074                 </actions>
10075             </permacrud>
10076         </class>
10077         
10078         <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">
10079             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10080                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10081                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10082                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10083                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10084                 </fields>
10085                 <links/>
10086         </class>
10087
10088         <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">
10089                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
10090                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
10091                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
10092                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
10093                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
10094                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
10095                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
10096                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
10097                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
10098                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
10099                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
10100                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
10101                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
10102                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
10103                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
10104                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes"/>
10105                 </fields>
10106                 <links>
10107                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10108                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10109                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10110                 </links>
10111         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10112             <actions>
10113                 <create permission="ADMIN_PROVIDER">
10114                     <context link="provider" field="owner"/>
10115                 </create>
10116                 <retrieve permission="ADMIN_PROVIDER">
10117                     <context link="provider" field="owner"/>
10118                 </retrieve>
10119                 <update permission="ADMIN_PROVIDER">
10120                     <context link="provider" field="owner"/>
10121                 </update>
10122                 <delete permission="ADMIN_PROVIDER">
10123                     <context link="provider" field="owner"/>
10124                 </delete>
10125             </actions>
10126         </permacrud>
10127         </class>
10128
10129         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
10130                 oils_obj:fieldmapper="acq::edi_attr" 
10131                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
10132                 <fields oils_persist:primary="key">
10133                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
10134                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10135                 </fields>
10136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10137             <actions>
10138                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10139                 <retrieve/>
10140                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10141                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10142             </actions>
10143         </permacrud>
10144         </class>
10145         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
10146                 oils_obj:fieldmapper="acq::edi_attr_set" 
10147                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
10148                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
10149                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10150                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10151                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
10152                 </fields>
10153                 <links>
10154                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
10155                 </links>
10156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10157             <actions>
10158                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10159                 <retrieve/>
10160                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10161                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10162             </actions>
10163         </permacrud>
10164         </class>
10165         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
10166                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
10167                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
10168                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
10169                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10170                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
10171                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
10172                 </fields>
10173                 <links>
10174                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10175                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
10176                 </links>
10177         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10178             <actions>
10179                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10180                 <retrieve/>
10181                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10182                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10183             </actions>
10184         </permacrud>
10185         </class>
10186
10187
10188         <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">
10189                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
10190                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
10191                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
10192                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
10193                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
10194                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
10195                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
10196                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
10197                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
10198                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
10199                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
10200                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
10201                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
10202                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
10203                 </fields>
10204                 <links>
10205                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
10206                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10207                 </links>
10208         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10209             <actions>
10210                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10211                     <context link="account" jump="provider" field="owner"/>
10212                 </retrieve>
10213                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10214                     <context link="account" jump="provider" field="owner"/>
10215                 </update>
10216                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10217                     <context link="account" jump="provider" field="owner"/>
10218                 </delete>
10219             </actions>
10220         </permacrud>
10221         </class>
10222
10223
10224         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
10225                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
10226                         <field name="id" reporter:datatype="id" />
10227                         <field name="parent" reporter:datatype="link"/>
10228                         <field name="owner" reporter:datatype="link"/>
10229                         <field name="create_time" reporter:datatype="timestamp"/>
10230                         <field name="name" reporter:datatype="text"/>
10231                         <field name="shared" reporter:datatype="bool"/>
10232                         <field name="share_with" reporter:datatype="link"/>
10233                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10234                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
10235                 </fields>
10236                 <links>
10237                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10238                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
10239                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
10240                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10241                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
10242                 </links>
10243         </class>
10244         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
10245                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
10246                         <field name="id" reporter:datatype="id" />
10247                         <field name="parent" reporter:datatype="link"/>
10248                         <field name="owner" reporter:datatype="link"/>
10249                         <field name="create_time" reporter:datatype="timestamp"/>
10250                         <field name="name" reporter:datatype="text"/>
10251                         <field name="shared" reporter:datatype="bool"/>
10252                         <field name="share_with" reporter:datatype="link"/>
10253                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10254                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
10255                 </fields>
10256                 <links>
10257                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10258                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
10259                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
10260                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10261                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
10262                 </links>
10263         </class>
10264         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
10265                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
10266                         <field name="id" reporter:datatype="id" />
10267                         <field name="parent" reporter:datatype="link"/>
10268                         <field name="owner" reporter:datatype="link"/>
10269                         <field name="create_time" reporter:datatype="timestamp"/>
10270                         <field name="name" reporter:datatype="text"/>
10271                         <field name="shared" reporter:datatype="bool"/>
10272                         <field name="share_with" reporter:datatype="link"/>
10273                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10274                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10275                 </fields>
10276                 <links>
10277                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10278                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
10279                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
10280                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10281                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
10282                 </links>
10283         </class>
10284         <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">
10285                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
10286                         <field name="id" reporter:datatype="id" />
10287                         <field name="owner" reporter:datatype="link"/>
10288                         <field name="create_time" reporter:datatype="timestamp"/>
10289                         <field name="name" reporter:datatype="text"/>
10290                         <field name="data" reporter:datatype="text"/>
10291                         <field name="folder" reporter:datatype="link"/>
10292                         <field name="description" reporter:datatype="text"/>
10293                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10294                 </fields>
10295                 <links>
10296                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10297                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
10298                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
10299                 </links>
10300         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10301             <actions>
10302                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10303                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10304                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10305                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10306             </actions>
10307         </permacrud>
10308         </class>
10309         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
10310                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
10311                         <field name="id" reporter:datatype="id" />
10312                         <field name="owner" reporter:datatype="link"/>
10313                         <field name="create_time" reporter:datatype="timestamp"/>
10314                         <field name="template" reporter:datatype="link"/>
10315                         <field name="data" reporter:datatype="text"/>
10316                         <field name="folder" reporter:datatype="link"/>
10317                         <field name="recur" reporter:datatype="bool"/>
10318                         <field name="recurrence" reporter:datatype="interval"/>
10319                         <field name="name" reporter:datatype="text"/>
10320                         <field name="description" reporter:datatype="text"/>
10321                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
10322                 </fields>
10323                 <links>
10324                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10325                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
10326                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
10327                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
10328                 </links>
10329         </class>
10330         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
10331                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
10332                         <field name="id" reporter:datatype="id" />
10333                         <field name="runner" reporter:datatype="link"/>
10334                         <field name="start_time" reporter:datatype="timestamp"/>
10335                         <field name="complete_time" reporter:datatype="timestamp"/>
10336                         <field name="run_time" reporter:datatype="timestamp"/>
10337                         <field name="email" reporter:datatype="text"/>
10338                         <field name="excel_format" reporter:datatype="bool"/>
10339                         <field name="csv_format" reporter:datatype="bool"/>
10340                         <field name="html_format" reporter:datatype="bool"/>
10341                         <field name="error_code" reporter:datatype="int"/>
10342                         <field name="error_text" reporter:datatype="text"/>
10343                         <field name="report" reporter:datatype="link"/>
10344                         <field name="folder" reporter:datatype="link"/>
10345                         <field name="chart_pie" reporter:datatype="bool"/>
10346                         <field name="chart_bar" reporter:datatype="bool"/>
10347                         <field name="chart_line" reporter:datatype="bool"/>
10348                 </fields>
10349                 <links>
10350                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
10351                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
10352                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
10353                 </links>
10354         </class>
10355         <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">
10356                 <fields oils_persist:primary="id">
10357                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10358                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10359                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10360                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10361                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10362                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10363                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10364                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10365                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10366                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10367                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10368                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10369                 </fields>
10370                 <links>
10371                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10372                 </links>
10373                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10374                         <actions>
10375                                 <retrieve />
10376                         </actions>
10377                 </permacrud>
10378         </class>
10379         <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">
10380                 <fields oils_persist:primary="id">
10381                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10382                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10383                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10384                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10385                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10386                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10387                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10388                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10389                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10390                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10391                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10392                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10393                 </fields>
10394                 <links>
10395                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10396                 </links>
10397         </class>
10398         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
10399                 <fields oils_persist:primary="id">
10400                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10401                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
10402                         <field reporter:label="Fingerprint" name="fingerprint" />
10403                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10404                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10405                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10406                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10407                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
10408                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10409                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10410                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10411                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
10412                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
10413                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
10414                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10415                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10416                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
10417                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
10418                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
10419                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
10420                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
10421                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
10422                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10423                 </fields>
10424                 <links>
10425                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10426                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10427                 </links>
10428         </class>
10429         <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">
10430                 <fields oils_persist:primary="id">
10431                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10432                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10433                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10434                 </fields>
10435                 <links>
10436                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10437                 </links>
10438         </class>
10439         <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">
10440                 <fields oils_persist:primary="id">
10441                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10442                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10443                 </fields>
10444                 <links>
10445                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10446                 </links>
10447         </class>
10448         <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">
10449                 <fields oils_persist:primary="id">
10450                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10451                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10452                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10453                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10454                 </fields>
10455                 <links>
10456                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10457                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10458                 </links>
10459         </class>
10460         <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">
10461                 <fields oils_persist:primary="xact">
10462                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10463                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="money" />
10464                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
10465                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
10466                 </fields>
10467                 <links>
10468                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10469                 </links>
10470         </class>
10471         <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">
10472                 <fields oils_persist:primary="xact">
10473                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10474                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="money" />
10475                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
10476                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
10477                 </fields>
10478                 <links>
10479                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10480                 </links>
10481         </class>
10482         <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)">
10483                 <fields oils_persist:primary="id">
10484                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
10485                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
10486                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
10487                 </fields>
10488                 <links>
10489                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10490                 </links>
10491         </class>
10492         <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">
10493                 <fields oils_persist:primary="id">
10494                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
10495                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
10496                 </fields>
10497                 <links>
10498                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10499                 </links>
10500         </class>
10501         <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">
10502                 <fields oils_persist:primary="bibid">
10503                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
10504                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
10505                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
10506                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
10507                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
10508                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
10509                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
10510                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
10511                 </fields>
10512                 <links>
10513                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
10514                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10515                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10516                 </links>
10517         </class>
10518         <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">
10519                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
10520                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
10521                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
10522                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
10523                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
10524                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
10525                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
10526                 </fields>
10527                 <links>
10528                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10529                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
10530                 </links>
10531                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10532                         <actions>
10533                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10534                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10535                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10536                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10537                         </actions>
10538                 </permacrud>
10539         </class>
10540         <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">
10541                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
10542                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
10543                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
10544                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
10545                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10546                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10547                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
10548                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10549                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
10550                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
10551                 </fields>
10552                 <links>
10553                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10554                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10555                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10556                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10557                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10558                 </links>
10559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10560                         <actions>
10561                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
10562                                         <context link="formula" field="owner"/>
10563                                 </create>
10564                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
10565                                         <context link="formula" field="owner"/>
10566                                 </retrieve>
10567                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
10568                                         <context link="formula" field="owner"/>
10569                                 </update>
10570                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
10571                                         <context link="formula" field="owner"/>
10572                                 </delete>
10573                         </actions>
10574                 </permacrud>
10575         </class>
10576
10577         <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">
10578                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
10579                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10580                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10581                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10582                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
10583                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10584                 </fields>
10585                 <links>
10586                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10587                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10588                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10589                 </links>
10590                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10591                         <actions>
10592                                 <create permission="CREATE_PURCHASE_ORDER">
10593                                         <context link="formula" field="owner"/>
10594                 </create>
10595                                 <retrieve permission="CREATE_PURCHASE_ORDER">
10596                                         <context link="formula" field="owner"/>
10597                 </retrieve>
10598                                 <update permission="CREATE_PURCHASE_ORDER">
10599                                         <context link="formula" field="owner"/>
10600                 </update>
10601                                 <delete permission="CREATE_PURCHASE_ORDER">
10602                                         <context link="formula" field="owner"/>
10603                 </delete>
10604                         </actions>
10605                 </permacrud>
10606         </class>
10607
10608         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
10609                 <fields oils_persist:primary="id">
10610                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
10611                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10612                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
10613                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
10614                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
10615                 </fields>
10616                 <links>
10617                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10618                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
10619                 </links>
10620         </class>
10621
10622         <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">
10623                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
10624                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10625                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10626                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10627                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10628                 </fields>
10629                 <links>
10630                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10631                 </links>
10632                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10633                         <actions>
10634                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10635                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10636                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10637                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10638                         </actions>
10639                 </permacrud>
10640         </class>
10641
10642         <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">
10643                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
10644                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10645                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10646                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10647                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10648                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
10649                 </fields>
10650                 <links>
10651                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10652                 </links>
10653                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10654                         <actions>
10655                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10656                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10657                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10658                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10659                         </actions>
10660                 </permacrud>
10661         </class>
10662
10663         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
10664                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
10665                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10666                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10667                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10668                 </fields>
10669                 <links>
10670                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10671                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10672                 </links>
10673         </class>
10674
10675         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
10676                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
10677                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10678                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10679                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10680                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10681                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10682                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10683                 </fields>
10684                 <links>
10685                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10686                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
10687                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10688                 </links>
10689         </class>
10690
10691         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
10692                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
10693                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10694                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10695                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
10696                 </fields>
10697                 <links>
10698                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10699                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
10700                 </links>
10701         </class>
10702
10703         <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">
10704                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
10705                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10706                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10707                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10708                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10709                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10710                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10711                 </fields>
10712                 <links>
10713                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10714                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
10715                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10716                 </links>
10717         </class>
10718
10719         <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">
10720                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
10721                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
10722                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10723                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
10724                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10725                 </fields>
10726                 <links>
10727                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10728                 </links>
10729                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10730             <actions>
10731                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10732                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
10733                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10734                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10735             </actions>
10736                 </permacrud>
10737         </class>
10738
10739         <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">
10740                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
10741                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
10742                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
10743                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
10744                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
10745                 </fields>
10746                 <links>
10747                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10748                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
10749                 </links>
10750                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10751                         <actions>
10752                                 <create permission="ADMIN_CLAIM_POLICY">
10753                                         <context link="claim_policy" field="org_unit"/>
10754                 </create>
10755                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
10756                                         <context link="claim_policy" field="org_unit"/>
10757                 </retrieve>
10758                                 <update permission="ADMIN_CLAIM_POLICY">
10759                                         <context link="claim_policy" field="org_unit"/>
10760                 </update>
10761                                 <delete permission="ADMIN_CLAIM_POLICY">
10762                                         <context link="claim_policy" field="org_unit"/>
10763                 </delete>
10764                         </actions>
10765                 </permacrud>
10766         </class>
10767
10768     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
10769         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
10770             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10771             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
10772             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10773             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
10774             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
10775             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
10776             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
10777             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
10778             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
10779             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
10780             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
10781             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
10782             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
10783             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
10784             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10785             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
10786                                                 <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
10787                                                 <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
10788                                                 <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
10789         </fields>
10790         <links>
10791             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
10792             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10793         </links>
10794     </class>
10795
10796     <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">
10797         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
10798             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10799             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10800             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10801             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10802             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10803         </fields>
10804     </class>
10805
10806     <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">
10807         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10808             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10809             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10810             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10811             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10812             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10813             <field reporter:label="City" name="city" reporter:datatype="text"/>
10814             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10815             <field reporter:label="State" name="state" reporter:datatype="text"/>
10816             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10817             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10818             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10819         </fields>
10820     </class>
10821
10822     <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">
10823         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10824             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10825             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10826             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10827             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10828             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10829             <field reporter:label="City" name="city" reporter:datatype="text"/>
10830             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10831             <field reporter:label="State" name="state" reporter:datatype="text"/>
10832             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10833             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10834             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10835         </fields>
10836     </class>
10837
10838     <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">
10839         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
10840             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10841             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10842             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10843             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
10844             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
10845             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10846         </fields>
10847     </class>
10848
10849     <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">
10850         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
10851             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10852             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10853             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10854             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
10855             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
10856             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10857         </fields>
10858     </class>
10859
10860         <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">
10861                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
10862                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
10863                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10864                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
10865                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
10866                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
10867                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
10868                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
10869                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
10870                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10871                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10872                 </fields>
10873                 <links>
10874                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10875                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10876                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
10877                 </links>
10878                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10879                         <actions>
10880                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10881                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10882                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10883                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10884                         </actions>
10885                 </permacrud>
10886         </class>
10887
10888         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
10889                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
10890                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
10891                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10892                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10893                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
10894                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
10895                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
10896                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
10897                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
10898                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
10899                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
10900                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
10901                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
10902                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
10903                 </fields>
10904                 <links>
10905                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10906                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10907                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10908                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
10909                 </links>
10910                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10911                         <actions>
10912                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10913                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10914                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10915                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10916                         </actions>
10917                 </permacrud>
10918         </class>
10919
10920         <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">
10921                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
10922                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
10923                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
10924                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
10925                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
10926                 </fields>
10927                 <links>
10928                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
10929                 </links>
10930                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
10931                         <actions>
10932                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10933                     <context link="fieldset" field="owning_lib"/>
10934                 </create>
10935                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10936                     <context link="fieldset" field="owning_lib"/>
10937                 </retrieve>
10938                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10939                     <context link="fieldset" field="owning_lib"/>
10940                 </update>
10941                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10942                     <context link="fieldset" field="owning_lib"/>
10943                 </delete>
10944                         </actions>
10945                 </permacrud>
10946         </class>
10947
10948     <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">
10949         <fields>
10950             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10951             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10952             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10953         </fields>
10954                 <links>
10955                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10956                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10957                 </links>
10958     </class>
10959
10960     <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">
10961         <fields>
10962             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10963             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
10964         </fields>
10965                 <links>
10966                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10967                 </links>
10968     </class>
10969
10970     <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">
10971         <fields>
10972             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10973             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10974             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10975         </fields>
10976                 <links>
10977                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10978                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10979                 </links>
10980     </class>
10981
10982     <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">
10983         <fields>
10984             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10985             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
10986         </fields>
10987                 <links>
10988                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10989                 </links>
10990     </class>
10991
10992     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
10993                 <oils_persist:source_definition><![CDATA[
10994
10995             SELECT  DISTINCT l.*
10996               FROM  action.unfulfilled_hold_loops l
10997                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
10998               WHERE l.count = m.max
10999
11000                 ]]></oils_persist:source_definition>
11001         <fields>
11002             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11003             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11004             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11005         </fields>
11006                 <links>
11007                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11008                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11009                 </links>
11010     </class>
11011
11012         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
11013                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
11014                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
11015                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
11016                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
11017                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
11018                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
11019                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
11020                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
11021                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
11022                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
11023                 </fields>
11024                 <links>
11025                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
11026                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
11027                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
11028                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
11029                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
11030                 </links>
11031         </class>
11032
11033         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
11034                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
11035                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
11036                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
11037                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11038                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
11039                 </fields>
11040                 <links>
11041                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
11042                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
11043                 </links>
11044         </class>
11045
11046         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
11047                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
11048                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
11049                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
11050                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
11051                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
11052                 </fields>
11053                 <links>
11054                 </links>
11055         </class>
11056
11057         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
11058                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
11059                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
11060                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
11061                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11062                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
11063                 </fields>
11064                 <links>
11065                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
11066                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
11067                 </links>
11068         </class>
11069         
11070         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
11071                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
11072                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
11073                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
11074                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
11075                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
11076                 </fields>
11077                 <links>
11078                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
11079                 </links>
11080         </class>
11081         
11082         <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">
11083                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
11084                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
11085                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11086                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11087                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
11088                 </fields>
11089                 <links>
11090                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11091                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
11092                 </links>
11093         </class>
11094
11095         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
11096                 <fields oils_persist:primary="name">
11097                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
11098                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
11099                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
11100                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11101                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
11102                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
11103                 </fields>
11104                 <links>
11105                 </links>
11106         </class>
11107
11108         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
11109                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11110                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11111                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
11112                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11113                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11114                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11115                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11116                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11117                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11118                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11119                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11120                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11121                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11122                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11123                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11124                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11125                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11126                 </fields>
11127                 <links>
11128                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11129                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11130                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11131                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11132                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11133                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11134                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11135                 </links>
11136         </class>
11137
11138         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
11139                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
11140                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
11141                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11142                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11143                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
11144                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
11145                 </fields>
11146                 <links>
11147                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11148                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
11149                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
11150                 </links>
11151         </class>
11152
11153         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
11154                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
11155                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
11156                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
11157                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
11158                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
11159                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
11160                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
11161                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11162                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
11163                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11164                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
11165                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
11166                 </fields>
11167                 <links>
11168                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11169                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
11170                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
11171                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
11172                 </links>
11173         </class>
11174
11175         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
11176                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
11177                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
11178                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
11179                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11180                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11181                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
11182                 </fields>
11183                 <links>
11184                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
11185                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
11186                 </links>
11187         </class>
11188
11189         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
11190                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
11191                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
11192                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11193                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11194                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11195                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
11196                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
11197                 </fields>
11198                 <links>
11199                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11200                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11201                 </links>
11202         </class>
11203
11204         <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">
11205                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
11206                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
11207                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11208                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11209                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11210                 </fields>
11211                 <links>
11212                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11213                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11214                 </links>
11215         </class>
11216
11217         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
11218                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11219                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11220                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11221                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11222                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11223                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11224                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11225                 </fields>
11226                 <links>
11227                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11228                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11229                 </links>
11230         </class>
11231
11232         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
11233                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11234                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11235                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11236                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11237                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11238                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11239                 </fields>
11240                 <links>
11241                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11242                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11243                 </links>
11244         </class>
11245
11246         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
11247                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11248                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11249                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11250                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11251                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11252                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11253                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11254                 </fields>
11255                 <links>
11256                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11257                 </links>
11258         </class>
11259
11260         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
11261                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11262                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11263                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11264                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11265                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11266                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11267                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11268                 </fields>
11269                 <links>
11270                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11271                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11272                 </links>
11273         </class>
11274
11275         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
11276                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11277                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11278                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11279                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11280                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11281                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11282                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11283                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11284                 </fields>
11285                 <links>
11286                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11287                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11288                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11289                 </links>
11290         </class>
11291
11292         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
11293                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11294                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11295                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11296                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11297                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11298                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11299                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11300                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11301                 </fields>
11302                 <links>
11303                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11304                 </links>
11305         </class>
11306
11307         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
11308                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11309                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11310                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11311                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11312                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11313                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11314                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11315                 </fields>
11316                 <links>
11317                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11318                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11319                 </links>
11320         </class>
11321
11322         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
11323                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11324                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11325                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11326                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11327                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11328                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11329                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11330                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11331                 </fields>
11332                 <links>
11333                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11334                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11335                 </links>
11336         </class>
11337
11338         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
11339                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11340                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11341                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11342                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11343                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11344                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11345                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11346                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11347                 </fields>
11348                 <links>
11349                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11350                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11351                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11352                 </links>
11353         </class>
11354
11355         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
11356                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11357                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11358                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11359                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11360                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11361                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11362                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11363                 </fields>
11364                 <links>
11365                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11366                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11367                 </links>
11368         </class>
11369
11370         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
11371                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11372                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11373                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11374                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11375                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11376                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11377                 </fields>
11378                 <links>
11379                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11380                 </links>
11381         </class>
11382
11383         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
11384                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11385                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11386                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11387                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11388                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11389                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11390                 </fields>
11391                 <links>
11392                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11393                 </links>
11394         </class>
11395
11396         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
11397                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11398                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11399                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11400                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11401                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11402                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11403                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11404                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11405                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11406                 </fields>
11407                 <links>
11408                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11409                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11410                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11411                 </links>
11412         </class>
11413
11414         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
11415                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11416                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11417                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11418                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11419                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11420                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11421                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11422                 </fields>
11423                 <links>
11424                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11425                 </links>
11426         </class>
11427
11428         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
11429                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11430                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11431                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11432                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11433                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11434                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11435                 </fields>
11436                 <links>
11437                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11438                 </links>
11439         </class>
11440
11441         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
11442                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11443                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11444                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11445                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11446                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11447                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11448                 </fields>
11449                 <links>
11450                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11451                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11452                 </links>
11453         </class>
11454
11455         <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">
11456                 <fields oils_persist:primary="id">
11457                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
11458                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
11459                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
11460                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
11461                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
11462                 </fields>
11463                 <links>
11464                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
11465                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11466                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
11467                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
11468                 </links>
11469         </class>
11470
11471         <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">
11472                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
11473                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11474                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
11475                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11476                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
11477                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11478                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11479                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
11480                 </fields>
11481                 <links/>
11482                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11483                         <actions>
11484                                 <retrieve/>
11485                         </actions>
11486                 </permacrud>
11487         </class>
11488
11489         <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">
11490                 <fields oils_persist:primary="ptype_key">
11491                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
11492                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11493                 </fields>
11494                 <links/>
11495                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11496                         <actions>
11497                                 <retrieve/>
11498                         </actions>
11499                 </permacrud>
11500         </class>
11501
11502         <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">
11503                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
11504                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11505                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
11506                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11507                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11508                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11509                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11510                 </fields>
11511                 <links>
11512                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
11513                 </links>
11514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11515                         <actions>
11516                                 <retrieve/>
11517                         </actions>
11518                 </permacrud>
11519         </class>
11520
11521         <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">
11522                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
11523                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11524                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
11525                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
11526                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11527                 </fields>
11528                 <links>
11529                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11530                 </links>
11531                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11532                         <actions>
11533                                 <retrieve/>
11534                         </actions>
11535                 </permacrud>
11536         </class>
11537
11538     <class
11539         id="uvs"
11540         controller="open-ils.cstore open-ils.pcrud"
11541         oils_obj:fieldmapper="url_verify::session"
11542         oils_persist:tablename="url_verify.session"
11543         reporter:label="URL Verification Session"
11544     >
11545         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
11546             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
11547             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11548                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
11549             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
11550             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
11551             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11552             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
11553             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
11554             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
11555         </fields>
11556
11557         <links>
11558             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11559             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11560             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
11561             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
11562             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
11563         </links>
11564
11565         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11566             <actions>
11567                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
11568             </actions>
11569         </permacrud>
11570
11571     </class>
11572
11573     <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">
11574         <oils_persist:source_definition><![CDATA[
11575             SELECT
11576                 cbrebi.id AS id,  -- so we can have a pkey in our view
11577                 uvs.id AS session,
11578                 uvs.owning_lib,
11579                 cbrebi.target_biblio_record_entry
11580             FROM url_verify.session uvs
11581             JOIN container.biblio_record_entry_bucket cbreb
11582                 ON (uvs.container = cbreb.id)
11583             JOIN container.biblio_record_entry_bucket_item cbrebi
11584                 ON (cbrebi.bucket = cbreb.id)
11585         ]]></oils_persist:source_definition>
11586         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
11587             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
11588             <field reporter:label="Session" name="session" reporter:datatype="link" />
11589             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
11590             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
11591         </fields>
11592         <links>
11593             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
11594             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
11595             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
11596         </links>
11597         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11598             <actions>
11599                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
11600             </actions>
11601         </permacrud>
11602     </class>
11603
11604     <class
11605         id="uvus"
11606         controller="open-ils.cstore open-ils.pcrud"
11607         oils_obj:fieldmapper="url_verify::url_selector"
11608         oils_persist:tablename="url_verify.url_selector"
11609         reporter:label="URL Verification URL Selector"
11610     >
11611         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
11612             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
11613             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
11614                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11615             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
11616         </fields>
11617
11618         <links>
11619             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11620             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
11621         </links>
11622
11623         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11624             <actions>
11625                 <create permission="URL_VERIFY">
11626                     <context link="session" field="owning_lib"/>
11627                 </create>
11628                 <retrieve permission="URL_VERIFY">
11629                     <context link="session" field="owning_lib"/>
11630                 </retrieve>
11631                 <update permission="URL_VERIFY">
11632                     <context link="session" field="owning_lib"/>
11633                 </update>
11634                 <delete permission="URL_VERIFY">
11635                     <context link="session" field="owning_lib"/>
11636                 </delete>
11637             </actions>
11638         </permacrud>
11639
11640     </class>
11641
11642     <class
11643         id="uvu"
11644         controller="open-ils.cstore open-ils.pcrud"
11645         oils_obj:fieldmapper="url_verify::url"
11646         oils_persist:tablename="url_verify.url"
11647         reporter:label="URL Verification URL"
11648     >
11649         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
11650             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
11651                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
11652                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
11653                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11654                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
11655             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11656             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11657             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
11658             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
11659             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
11660             <field reporter:label="Host" name="host" reporter:datatype="text"/>
11661             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
11662             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
11663             <field reporter:label="Path" name="path" reporter:datatype="text"/>
11664             <field reporter:label="Page" name="page" reporter:datatype="text"/>
11665             <field reporter:label="Query" name="query" reporter:datatype="text"/>
11666             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
11667             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
11668         </fields>
11669
11670         <links>
11671             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
11672             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
11673             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11674             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
11675             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
11676         </links>
11677
11678         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11679             <actions>
11680                 <create permission="URL_VERIFY">
11681                     <context link="session" field="owning_lib"/>
11682                 </create>
11683                 <retrieve permission="URL_VERIFY">
11684                     <context link="session" field="owning_lib"/>
11685                 </retrieve>
11686                 <update permission="URL_VERIFY">
11687                     <context link="session" field="owning_lib"/>
11688                 </update>
11689                 <delete permission="URL_VERIFY">
11690                     <context link="session" field="owning_lib"/>
11691                 </delete>
11692             </actions>
11693         </permacrud>
11694
11695     </class>
11696
11697     <class
11698         id="uvva"
11699         controller="open-ils.cstore open-ils.pcrud"
11700         oils_obj:fieldmapper="url_verify::verification_attempt"
11701         oils_persist:tablename="url_verify.verification_attempt"
11702         reporter:label="URL Verification Attempt"
11703     >
11704         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
11705             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
11706                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
11707                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
11708             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
11709             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
11710         </fields>
11711
11712         <links>
11713             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11714             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11715         </links>
11716
11717         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11718             <actions>
11719                 <create permission="URL_VERIFY">
11720                     <context link="session" field="owning_lib"/>
11721                 </create>
11722                 <retrieve permission="URL_VERIFY">
11723                     <context link="session" field="owning_lib"/>
11724                 </retrieve>
11725                 <update permission="URL_VERIFY">
11726                     <context link="session" field="owning_lib"/>
11727                 </update>
11728                 <delete permission="URL_VERIFY">
11729                     <context link="session" field="owning_lib"/>
11730                 </delete>
11731             </actions>
11732         </permacrud>
11733
11734     </class>
11735
11736     <class
11737         id="uvuv"
11738         controller="open-ils.cstore open-ils.pcrud"
11739         oils_obj:fieldmapper="url_verify::url_verification"
11740         oils_persist:tablename="url_verify.url_verification"
11741         reporter:label="URL Verification"
11742     >
11743         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
11744             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
11745                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
11746                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
11747             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
11748             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
11749             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
11750             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
11751                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
11752         </fields>
11753
11754         <links>
11755             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
11756             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
11757             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
11758         </links>
11759
11760         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11761             <actions>
11762                 <create permission="URL_VERIFY">
11763                     <context link="attempt" jump="session" field="owning_lib"/>
11764                 </create>
11765                 <retrieve permission="URL_VERIFY">
11766                     <context link="attempt" jump="session" field="owning_lib"/>
11767                 </retrieve>
11768                 <update permission="URL_VERIFY">
11769                     <context link="attempt" jump="session" field="owning_lib"/>
11770                 </update>
11771                 <delete permission="URL_VERIFY">
11772                     <context link="attempt" jump="session" field="owning_lib"/>
11773                 </delete>
11774             </actions>
11775         </permacrud>
11776
11777     </class>
11778
11779         <class
11780                 id="cfdi"
11781                 controller="open-ils.cstore open-ils.pcrud"
11782                 oils_obj:fieldmapper="config::filter_dialog_interface"
11783                 oils_persist:tablename="config.filter_dialog_interface"
11784                 reporter:label="FilterDialog Interface">
11785                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
11786                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
11787                         <field reporter:label="Description" name="description" reporter:datatype="text" />
11788                 </fields>
11789                 <links>
11790                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
11791                 </links>
11792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11793                         <actions>
11794                                 <retrieve />
11795                         </actions>
11796                 </permacrud>
11797         </class>
11798
11799         <class
11800                 id="cfdfs"
11801                 controller="open-ils.cstore open-ils.pcrud"
11802                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
11803                 oils_persist:tablename="config.filter_dialog_filter_set"
11804                 reporter:label="FilterDialog Filter Set">
11805                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
11806                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11807                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11808                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11809                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11810                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
11811                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11812                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
11813                 </fields>
11814                 <links>
11815                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11816                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11817                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
11818                 </links>
11819                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11820                         <actions>
11821                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11822                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11823                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11824                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11825                         </actions>
11826                 </permacrud>
11827
11828         </class>
11829
11830         <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">
11831                 <fields oils_persist:primary="code">
11832                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
11833                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
11834                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
11835                 </fields>
11836                 <links/>
11837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11838                         <actions>
11839                                 <retrieve/>
11840                         </actions>
11841                 </permacrud>
11842         </class>
11843
11844         <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">
11845                 <oils_persist:source_definition><![CDATA[
11846
11847             SELECT  b.id,
11848                     MAX(dcp.edit_date) AS last_delete_date
11849              FROM   biblio.record_entry b
11850                     JOIN asset.call_number cn ON (cn.record = b.id)
11851                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
11852              WHERE  NOT b.deleted
11853              GROUP BY b.id
11854              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
11855
11856                 ]]></oils_persist:source_definition>
11857                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11858                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11859                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
11860                 </fields>
11861                 <links>
11862                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11863                 </links>
11864                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11865                         <actions>
11866                                 <retrieve/>
11867                         </actions>
11868                 </permacrud>
11869         </class>
11870
11871         <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">
11872                 <oils_persist:source_definition><![CDATA[
11873
11874             -- -- 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.
11875             -- -- 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
11876             -- -- may not.
11877             -- SELECT
11878             --     bre.id AS bib_id,
11879             --     COALESCE( z.copy_count, 0 ) AS copy_count,
11880             --     COALESCE( z.hold_count, 0 ) AS hold_count,
11881             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
11882             -- FROM (
11883                 SELECT
11884                     y.bre AS id,
11885                     COALESCE( x.copy_count, 0 ) AS copy_count,
11886                     y.hold_count AS hold_count,
11887                     (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
11888                 FROM (
11889                         SELECT
11890                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
11891                             COUNT(*) AS hold_count
11892                         FROM action.hold_request h
11893                         WHERE
11894                             cancel_time IS NULL
11895                             AND fulfillment_time IS NULL
11896                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
11897                         GROUP BY 1
11898                     )y LEFT JOIN (
11899                         SELECT 
11900                             (SELECT id
11901                                 FROM biblio.record_entry 
11902                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
11903                             ) AS bre, 
11904                             COUNT(*) AS copy_count
11905                         FROM asset.copy
11906                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
11907                         WHERE copy.holdable 
11908                             AND NOT copy.deleted 
11909                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
11910                         GROUP BY 1
11911                     )x ON x.bre = y.bre
11912                 -- )z RIGHT JOIN (
11913                 --     SELECT id
11914                 --     FROM biblio.record_entry
11915                 --     WHERE NOT deleted
11916                 -- )bre ON (z.bib_id = bre.id)
11917                 
11918
11919                 ]]></oils_persist:source_definition>
11920                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11921                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11922                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
11923                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
11924                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
11925                 </fields>
11926                 <links>
11927                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11928                 </links>
11929                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11930                         <actions>
11931                                 <retrieve/>
11932                         </actions>
11933                 </permacrud>
11934         </class>
11935
11936         <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">
11937                 <oils_persist:source_definition><![CDATA[
11938             SELECT *,
11939                 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,
11940                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
11941             FROM
11942                 (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
11943                     FROM
11944                         action.hold_request ahr
11945                         JOIN reporter.hold_request_record rhrr USING (id)
11946                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11947                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
11948                     WHERE
11949                         ahr.cancel_time IS NULL
11950                         AND ahr.fulfillment_time IS NULL
11951                     GROUP BY bib_record, pickup_lib
11952                 )x
11953                 JOIN
11954                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11955                     FROM
11956                         action.hold_request ahr
11957                         JOIN reporter.hold_request_record rhrr USING (id)
11958                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11959                     WHERE
11960                         ahr.cancel_time IS NULL
11961                         AND ahr.fulfillment_time IS NULL
11962                     GROUP BY bib_record
11963                 )y
11964                 USING (id)
11965                 ]]></oils_persist:source_definition>
11966                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11967                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11968                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
11969                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
11970                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
11971                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11972                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11973                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
11974                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11975                 </fields>
11976                 <links>
11977                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11978                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
11979                 </links>
11980                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11981                         <actions>
11982                                 <retrieve/>
11983                         </actions>
11984                 </permacrud>
11985         </class>
11986
11987         <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) ">
11988                 <oils_persist:source_definition><![CDATA[
11989             WITH counts_at_ou AS (
11990                 SELECT  rhrr.bib_record AS id,
11991                         aou.id AS pickup_lib_or_desc,
11992                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
11993                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
11994                   FROM  actor.org_unit aou
11995                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
11996                         action.hold_request ahr
11997                         JOIN reporter.hold_request_record rhrr USING (id)
11998                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11999                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
12000                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
12001                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
12002                         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
12003                   GROUP BY 1, 2
12004             )
12005             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
12006                    y.holds_everywhere, y.copy_count_everywhere,
12007                 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,
12008                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
12009             FROM counts_at_ou x
12010                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12011                     FROM
12012                         action.hold_request ahr
12013                         JOIN reporter.hold_request_record rhrr USING (id)
12014                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12015                     WHERE
12016                         ahr.cancel_time IS NULL
12017                         AND ahr.fulfillment_time IS NULL
12018                     GROUP BY bib_record
12019                 )y
12020                 USING (id)
12021                 ]]></oils_persist:source_definition>
12022                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12023                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12024                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
12025                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
12026                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
12027                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12028                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12029                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
12030                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12031                 </fields>
12032                 <links>
12033                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12034                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
12035                 </links>
12036                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12037                         <actions>
12038                                 <retrieve/>
12039                         </actions>
12040                 </permacrud>
12041         </class>
12042
12043         <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">
12044                 <oils_persist:source_definition><![CDATA[
12045             SELECT
12046                 ac.id,
12047                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
12048                 MAX(actac.xact_start) AS last_circ
12049             FROM asset.copy ac
12050                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12051             GROUP BY ac.id
12052
12053             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
12054             --SELECT
12055             --    ac.id,
12056             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
12057             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
12058             --FROM asset.copy ac
12059             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12060             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
12061             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
12062                 ]]></oils_persist:source_definition>
12063                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12064                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
12065                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
12066                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
12067                 </fields>
12068                 <links>
12069                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12070                 </links>
12071                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12072                         <actions>
12073                                 <retrieve/>
12074                         </actions>
12075                 </permacrud>
12076         </class>
12077
12078         <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">
12079                 <fields oils_persist:primary="id">
12080                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
12081                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
12082                 </fields>
12083                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12084                         <actions>
12085                                 <retrieve/>
12086                         </actions>
12087                 </permacrud>
12088         </class>
12089
12090         <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">
12091                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
12092                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12093                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
12094                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12095                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12096                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12097                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12098                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12099                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
12100                 </fields>
12101                 <links>
12102                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
12103                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12104                 </links>
12105                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12106                         <actions>
12107                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12108                                 <retrieve/>
12109                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12110                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12111                         </actions>
12112                 </permacrud>
12113         </class>
12114
12115         <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">
12116                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
12117                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12118                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
12119                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12120                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12121                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12122                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12123                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12124                 </fields>
12125                 <links>
12126                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
12127                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12128                 </links>
12129                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12130                         <actions>
12131                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12132                                 <retrieve/>
12133                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12134                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12135                         </actions>
12136                 </permacrud>
12137         </class>
12138
12139
12140         <!-- ********************************************************************************************************************* -->
12141         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
12142         <!-- ********************************************************************************************************************* -->
12143         <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">
12144                 <fields oils_persist:primary="id">
12145                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
12146                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
12147                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
12148                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12149                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
12150                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
12151                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12152                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
12153                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
12154                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
12155                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
12156                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
12157                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
12158                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
12159                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12160                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
12161                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
12162                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
12163                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
12164                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
12165                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
12166                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
12167                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
12168                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
12169                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
12170                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
12171                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
12172                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
12173                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
12174                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12175                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12176                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12177                 </fields>
12178                 <links>
12179                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12180                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
12181                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
12182                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
12183                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
12184                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
12185                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
12186                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
12187                 </links>
12188         </class>
12189
12190         <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">
12191                 <fields oils_persist:primary="id">
12192                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12193                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12194                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12195                 </fields>
12196                 <links>
12197                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12198                 </links>
12199         </class>
12200
12201         <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">
12202                 <fields oils_persist:primary="id">
12203                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12204                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12205                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12206                 </fields>
12207                 <links>
12208                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12209                 </links>
12210         </class>
12211
12212         <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">
12213                 <fields oils_persist:primary="id">
12214                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
12215
12216                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
12217                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
12218                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
12219
12220                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
12221                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
12222                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
12223
12224                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
12225                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
12226
12227                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12228                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
12229                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
12230
12231                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
12232                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
12233
12234                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
12235                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
12236                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
12237
12238                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
12239                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
12240                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
12241
12242                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12243                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
12244                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
12245                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
12246
12247                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
12248                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
12249
12250                 </fields>
12251                 <links>
12252                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
12253                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12254                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
12255                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
12256                 </links>
12257         </class>
12258
12259         <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">
12260                 <oils_persist:source_definition><![CDATA[
12261
12262             SELECT
12263                 po.ordering_agency AS ordering_agency,
12264                 po.id AS purchase_order,
12265                 li.id AS lineitem,
12266                 lid.id AS lineitem_detail,
12267                 cpa.id AS claim_policy_action
12268             FROM
12269                 acq.lineitem_detail lid
12270                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
12271                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
12272                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
12273                 JOIN acq.claim_policy_action cpa ON (
12274                     cpa.claim_policy = cp.id
12275
12276                     -- we only care about claim policy actions whose claim
12277                     -- interval we'd reached or exceeded
12278                     AND (NOW() - cpa.action_interval) > po.order_date
12279
12280                     -- filter out all claim policy actions where claim events
12281                     -- have occurred on or after the action's action_interval
12282                     AND NOT EXISTS (
12283                         SELECT 1
12284                         FROM
12285                             acq.claim_event evt
12286                             JOIN acq.claim claim ON (
12287                                 claim.id = evt.claim
12288                                 AND claim.lineitem_detail = lid.id
12289                             )
12290                         WHERE
12291                             evt.event_date >= (po.order_date + cpa.action_interval)
12292                     )
12293                 )
12294             WHERE
12295                 lid.cancel_reason IS NULL
12296                 AND li.cancel_reason IS NULL -- belt/suspenders
12297                 AND po.cancel_reason IS NULL -- belt/suspenders
12298                 AND lid.recv_time IS NULL
12299                 AND po.state = 'on-order'
12300             ORDER BY 1, 2, 3, 4, 5
12301
12302                 ]]></oils_persist:source_definition>
12303                 <fields>
12304                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
12305                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
12306                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12307                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
12308                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
12309                 </fields>
12310                 <links>
12311                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
12312                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
12313                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12314                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
12315                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
12316                 </links>
12317         </class>
12318         <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">
12319                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12320                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12321                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12322                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12323                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12324                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12325                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12326                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12327                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12328                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12329                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12330                 </fields>
12331                 <links>
12332                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12333                 </links>
12334     </class>
12335         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
12336                 <oils_persist:source_definition><![CDATA[
12337             SELECT * FROM acq.lineitem_summary 
12338                                 WHERE item_count > (invoice_count + cancel_count)
12339         ]]></oils_persist:source_definition>
12340                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12341                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12342                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12343                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12344                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12345                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12346                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12347                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12348                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12349                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12350                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12351                 </fields>
12352                 <links>
12353                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12354                 </links>
12355     </class>
12356         <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">
12357                 <oils_persist:source_definition><![CDATA[
12358
12359                         SELECT  t.*
12360                           FROM  action.transit_copy t
12361                                 JOIN actor.org_unit AS s ON (t.source = s.id)
12362                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
12363                           WHERE s.parent_ou <> d.parent_ou
12364
12365                 ]]></oils_persist:source_definition>
12366                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
12367                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
12368                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
12369                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
12370                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
12371                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
12372                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
12373                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
12374                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
12375                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
12376                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
12377                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
12378                 </fields>
12379                 <links>
12380                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
12381                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
12382                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
12383                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
12384                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12385                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
12386                 </links>
12387         </class>
12388
12389     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
12390                 <oils_persist:source_definition><![CDATA[
12391
12392         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
12393                 SELECT
12394                         cp.id as copy,
12395                         COUNT(circ.id),
12396                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12397                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12398                 FROM
12399                         asset.copy cp
12400                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
12401                 GROUP BY 1, 3, 4
12402                 UNION ALL
12403                 SELECT
12404                         cp.id as copy,
12405                         COUNT(circ.id),
12406                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12407                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12408                 FROM
12409                         asset.copy cp
12410                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
12411                 GROUP BY 1, 3, 4
12412                 UNION ALL
12413                 SELECT
12414                         id as copy,
12415                         circ_count,
12416                         -1 AS year,
12417                         false as is_renewal
12418                 FROM
12419                         extend_reporter.legacy_circ_count
12420         )x GROUP BY 1, 3, 4
12421
12422                 ]]></oils_persist:source_definition>
12423         <fields>
12424             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
12425             <field reporter:label="Count" name="count" reporter:datatype="int"/>
12426             <field reporter:label="Year" name="year" reporter:datatype="int"/>
12427             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
12428         </fields>
12429                 <links>
12430                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12431                 </links>
12432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12433                         <actions>
12434                                 <retrieve/>
12435                         </actions>
12436                 </permacrud>
12437     </class>
12438
12439         <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">
12440                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
12441                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
12442                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
12443                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
12444                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
12445                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
12446                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
12447                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
12448                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
12449                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
12450                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
12451                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
12452                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
12453                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
12454                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
12455                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
12456                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
12457                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
12458                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
12459                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
12460                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
12461                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
12462                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
12463                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
12464                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
12465                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
12466                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
12467                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
12468                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
12469                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
12470                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
12471                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
12472                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
12473                 </fields>
12474                 <links>
12475                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
12476                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
12477                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
12478                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12479                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
12480                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12481                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12482                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
12483                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
12484                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
12485                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
12486                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
12487                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
12488                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
12489                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
12490                 </links>
12491         </class>
12492
12493     <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">
12494         <fields oils_persist:primary="id">
12495             <field reporter:label="Title" name="title" reporter:datatype="text"/>
12496             <field reporter:label="Author" name="author" reporter:datatype="text"/>
12497             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
12498             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12499             <field reporter:label="Price" name="price" reporter:datatype="money"/>
12500             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
12501             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
12502             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
12503             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12504             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
12505             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12506             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
12507             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
12508             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
12509             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12510             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12511             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
12512             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
12513             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
12514             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
12515             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
12516             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
12517             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12518             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
12519             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
12520             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
12521             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
12522             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
12523             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
12524             <field reporter:label="Status" name="status" reporter:datatype="link"/>
12525             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
12526             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
12527             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
12528             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
12529         </fields>
12530         <links>
12531             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12532             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12533             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12534             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12535             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
12536             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
12537             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
12538             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
12539         </links>
12540     </class>
12541
12542     <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">
12543         <fields oils_persist:primary="id">
12544             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12545             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12546             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12547             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12548         </fields>
12549         <links>
12550             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12551             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12552         </links>
12553     </class>
12554
12555     <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">
12556         <fields oils_persist:primary="owning_lib">
12557             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12558             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12559             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12560         </fields>
12561         <links>
12562             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12563         </links>
12564     </class>
12565
12566     <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">
12567         <fields oils_persist:primary="id">
12568             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12569             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12570             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12571             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12572             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12573         </fields>
12574         <links>
12575             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12576             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12577             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12578         </links>
12579     </class>
12580
12581     <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">
12582         <fields oils_persist:primary="circ_lib">
12583             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12584             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12585             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12586             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12587         </fields>
12588         <links>
12589             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12590             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12591         </links>
12592     </class>
12593
12594     <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">
12595         <fields oils_persist:primary="id">
12596             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12597             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12598             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12599             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12600             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12601         </fields>
12602         <links>
12603             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12604             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12605             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12606         </links>
12607     </class>
12608
12609     <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">
12610         <fields oils_persist:primary="home_ou">
12611             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12612             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12613             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12614             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12615         </fields>
12616         <links>
12617             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12618             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12619         </links>
12620     </class>
12621         <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">
12622                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
12623                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
12624                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
12625                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
12626                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
12627                 </fields>
12628                 <links>
12629                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12630                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
12631                 </links>
12632                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12633                         <actions>
12634                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12635                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
12636                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12637                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12638                         </actions>
12639                 </permacrud>
12640         </class>
12641         <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">
12642                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
12643                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
12644                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
12645                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
12646                 </fields>
12647                 <links>
12648                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
12649                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
12650                         </links>
12651                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12652                 <actions>
12653                                 <create permission="ADMIN_ACQ_FUND_TAG">
12654                                         <context link="tag" field="owner"/>
12655                                 </create>
12656                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
12657                                         <context link="tag" field="owner"/>
12658                                 </retrieve>
12659                                 <update permission="ADMIN_ACQ_FUND_TAG">
12660                                         <context link="tag" field="owner"/>
12661                                 </update>
12662                                 <delete permission="ADMIN_ACQ_FUND_TAG">
12663                                         <context link="tag" field="owner"/>
12664                                 </delete>
12665                         </actions>
12666                 </permacrud>
12667         </class>
12668         <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">
12669                 <oils_persist:source_definition><![CDATA[
12670                 SELECT
12671                         poi.purchase_order AS purchase_order,
12672                         ii.invoice AS invoice,
12673                         NULL AS lineitem,
12674                         poi.id AS po_item,
12675                         NULL AS picklist
12676                 FROM
12677                         acq.po_item poi
12678                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
12679                 UNION SELECT
12680                         jub.purchase_order AS purchase_order,
12681                         ie.invoice AS invoice,
12682                         jub.id AS lineitem,
12683                         NULL AS po_item,
12684                         jub.picklist AS picklist
12685                 FROM
12686                         acq.lineitem jub
12687                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
12688                 UNION SELECT
12689                         ii.purchase_order AS purchase_order,
12690                         ii.invoice AS invoice,
12691                         NULL AS lineitem,
12692                         NULL AS po_item,
12693                         NULL AS picklist
12694                 FROM
12695                         acq.invoice_item ii
12696                 WHERE ii.po_item IS NULL
12697                 UNION SELECT
12698                         ie.purchase_order AS purchase_order,
12699                         ie.invoice AS invoice,
12700                         NULL AS lineitem,
12701                         NULL AS po_item,
12702                         NULL AS picklist
12703                 FROM
12704                         acq.invoice_entry ie
12705                 WHERE ie.lineitem IS NULL
12706                 UNION SELECT
12707                         NULL AS purchase_order,
12708                         NULL AS invoice,
12709                         jub.id AS lineitem,
12710                         NULL AS po_item,
12711                         jub.picklist AS picklist
12712                 FROM
12713                         acq.lineitem jub
12714                 WHERE jub.purchase_order IS NULL
12715                 ]]></oils_persist:source_definition>
12716                 <fields>
12717                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
12718                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
12719                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
12720                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
12721                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
12722                 </fields>
12723                 <links>
12724                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
12725                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
12726                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
12727                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
12728                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
12729                 </links>
12730         </class>
12731         <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">
12732                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
12733                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12734                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12735                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
12736                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
12737                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
12738                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12739                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
12740                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
12741                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
12742                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
12743                 </fields>
12744                 <links>
12745                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
12746                 </links>
12747                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12748                         <actions>
12749                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12750                                 <retrieve/>
12751                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12752                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12753                         </actions>
12754                 </permacrud>
12755         </class>
12756
12757         <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">
12758                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
12759                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12760                         <field name="date_applied" reporter:datatype="timestamp"/>
12761                         <field name="org" reporter:datatype="org_unit"/>
12762                         <field name="original_value" reporter:datatype="text"/>
12763                         <field name="new_value" reporter:datatype="text"/>
12764                         <field name="field_name" reporter:datatype="link"/>
12765                 </fields>
12766                 <links>
12767                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
12768                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
12769                 </links>
12770                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12771                         <actions>
12772                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
12773                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
12774                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12775                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12776                         </actions>
12777                 </permacrud>
12778         </class>
12779         <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">
12780                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12781                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12782                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12783                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12784                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12785                 </fields>
12786                 <links>
12787                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12788                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
12789                 </links>
12790         </class>
12791         <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">
12792                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12793                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12794                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12795                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12796                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12797                 </fields>
12798                 <links>
12799                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12800                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
12801                 </links>
12802         </class>
12803         <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">
12804                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
12805                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
12806                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
12807                         <field reporter:label="Manual" name="manual" reporter:datatype="bool" oils_obj:required="true"/>
12808                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
12809                 </fields>
12810                 <links>
12811                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
12812                 </links>
12813                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12814                         <actions>
12815                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12816                                 <retrieve/>
12817                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12818                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12819                         </actions>
12820                 </permacrud>
12821         </class>
12822         <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">
12823                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
12824                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12825                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link" oils_obj:required="true"/>
12826                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" oils_obj:required="true"/>
12827                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int" oils_obj:required="true"/>
12828                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
12829                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool" oils_obj:required="true"/>
12830                 </fields>
12831                 <links>
12832                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
12833                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
12834                 </links>
12835                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12836                         <actions>
12837                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12838                                 <retrieve/>
12839                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12840                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12841                         </actions>
12842                 </permacrud>
12843         </class>
12844         <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">
12845                 <fields oils_persist:primary="code">
12846                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
12847                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
12848                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12849                 </fields>
12850                 <links>
12851                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12852                 </links>
12853                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12854                         <actions>
12855                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12856                                 <retrieve/>
12857                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12858                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12859                         </actions>
12860                 </permacrud>
12861         </class>
12862         <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">
12863                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
12864                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12865                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
12866                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12867                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12868                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
12869                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
12870                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12871                         <field reporter:label="URL" name="url" reporter:datatype="text"/>
12872                 </fields>
12873                 <links>
12874                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
12875                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12876                 </links>
12877                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12878                         <actions>
12879                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
12880                                 <retrieve/>
12881                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
12882                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
12883                         </actions>
12884                 </permacrud>
12885         </class>
12886         <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">
12887                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
12888                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12889                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
12890                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
12891                 </fields>
12892                 <links>
12893                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12894                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
12895                 </links>
12896                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12897                         <actions>
12898                                 <create permission="UPDATE_COPY">
12899                     <context link="copy" field="circ_lib"/>
12900                 </create>
12901                                 <retrieve/>
12902                                 <update permission="UPDATE_COPY">
12903                     <context link="copy" field="circ_lib"/>
12904                 </update>
12905                                 <delete permission="UPDATE_COPY">
12906                     <context link="copy" field="circ_lib"/>
12907                 </delete>
12908                         </actions>
12909                 </permacrud>
12910         </class>
12911         <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">
12912         <oils_persist:source_definition><![CDATA[
12913         SELECT ahcm.target_copy AS id,count(*) AS count
12914          FROM
12915          action.hold_request ahr,
12916          action.hold_copy_map ahcm
12917          WHERE
12918          ahr.cancel_time IS NULL AND
12919          ahr.fulfillment_time IS NULL AND
12920          ahr.capture_time IS NULL AND
12921          ahr.id = ahcm.hold
12922          GROUP BY ahcm.target_copy
12923         ]]></oils_persist:source_definition>
12924         <fields oils_persist:primary="id">
12925             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12926             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
12927         </fields>
12928         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12929             <actions>
12930                <retrieve/>
12931             </actions>
12932         </permacrud>
12933         </class>
12934
12935         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
12936                 oils_obj:fieldmapper="config::workstation_setting_type" 
12937                 oils_persist:tablename="config.workstation_setting_type" 
12938                 reporter:label="Workstation Setting Type">
12939                 <fields oils_persist:primary="name">
12940                         <field name="name" reporter:datatype="text"/>
12941                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
12942                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
12943                         <field name="datatype" reporter:datatype="text"/>
12944                         <field name="fm_class" reporter:datatype="text"/>
12945                         <field name="grp" reporter:datatype="link"/>
12946                 </fields>
12947                 <links>
12948                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
12949                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
12950                 </links>
12951                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12952                         <actions>
12953                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12954                                 <retrieve/>
12955                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12956                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12957                         </actions>
12958                 </permacrud>
12959         </class>
12960
12961         <!-- no pcrud access is granted for now, because it's assumed these
12962                          setting values will be applied and retrived via the API. -->
12963         <class id="awss" 
12964                 controller="open-ils.cstore"
12965                 oils_obj:fieldmapper="actor::workstation_setting" 
12966                 oils_persist:tablename="actor.workstation_setting" 
12967                 reporter:label="Workstation Setting">
12968                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
12969                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
12970                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
12971                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12972                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
12973                 </fields>
12974                 <links>
12975                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
12976                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
12977                 </links>
12978         </class>
12979
12980         <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">
12981         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_type_id_seq">
12982                 <field name="id" reporter:selector="name" reporter:datatype="id"/>
12983                 <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
12984                 <field name="hold_type"  reporter:datatype="text" oils_persist:i18n="true"/>
12985         </fields>
12986         </class>
12987
12988         <class id="cpt" controller="open-ils.cstore open-ils.pcrud"
12989                 oils_obj:fieldmapper="config::print_template" 
12990                 oils_persist:tablename="config.print_template" 
12991                 reporter:label="Print Templates">
12992                 <fields oils_persist:primary="id" oils_persist:sequence="config.print_template_id_seq">
12993                         <field name="id" reporter:datatype="id"  reporter:selector="label"/>
12994                         <field name="name" reporter:datatype="text" oils_obj:required="true"/>
12995                         <field name="label" reporter:datatype="text" oils_obj:required="true" oils_persist:i18n="true"/>
12996                         <field reporter:label="Owner" name="owner" oils_obj:required="true" reporter:datatype="link"/>
12997                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12998                         <field reporter:label="Locale" name="locale" reporter:datatype="link"/>
12999                         <field name="content_type" reporter:datatype="text"/>
13000                         <field name="template" reporter:datatype="text" oils_obj:required="true"/>
13001                 </fields>
13002                 <links>
13003                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13004                         <link field="locale" reltype="has_a" key="id" map="" class="i18n_l"/>
13005                 </links>
13006                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13007                         <actions>
13008                                 <create permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13009                                 <retrieve permission="STAFF_LOGIN" context_field="owner"/>
13010                                 <update permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13011                                 <delete permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13012                         </actions>
13013                 </permacrud>
13014         </class>
13015
13016         <class id="cct" 
13017                 controller="open-ils.cstore open-ils.pcrud"
13018                 oils_obj:fieldmapper="config::carousel_type" 
13019                 oils_persist:tablename="config.carousel_type" 
13020                 reporter:label="Carousel Types">
13021                 <fields oils_persist:primary="id" oils_persist:sequence="config.carousel_type_id_seq">
13022                         <field reporter:label="Carousel Type ID" reporter:selector="name" name="id" reporter:datatype="id" />
13023                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13024                         <field reporter:label="Automatically Managed?" name="automatic" reporter:datatype="bool"/>
13025                         <field reporter:label="Filter By Age?" name="filter_by_age" reporter:datatype="bool"/>
13026                         <field reporter:label="Filter By Item Owning Library?" name="filter_by_copy_owning_lib" reporter:datatype="bool"/>
13027                         <field reporter:label="Filter By Item Location?" name="filter_by_copy_location" reporter:datatype="bool"/>
13028                 </fields>
13029                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13030                         <actions>
13031                                 <create permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13032                                 <retrieve/>
13033                                 <update permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13034                                 <delete permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13035                         </actions>
13036                 </permacrud>
13037         </class>
13038
13039         <class id="cc" 
13040                 controller="open-ils.cstore open-ils.pcrud"
13041                 oils_obj:fieldmapper="container::carousel" 
13042                 oils_persist:tablename="container.carousel" 
13043                 reporter:label="Carousels">
13044                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_id_seq">
13045                         <field reporter:label="Carousel ID" name="id" reporter:datatype="id" reporter:selector="name"/>
13046                         <field reporter:label="Carousel Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
13047                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13048                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13049                         <field reporter:label="Bucket" name="bucket" reporter:datatype="link"/>
13050                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
13051                         <field reporter:label="Editing User" name="editor" reporter:datatype="link"/>
13052                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
13053                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
13054                         <field reporter:label="Age Limit" name="age_filter"  reporter:datatype="interval"/>
13055                         <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 -->
13056                         <field reporter:label="Shelving Locations" name="copy_location_filter" reporter:datatype="text" /> <!-- ditto -->
13057                         <field reporter:label="Last Refresh Time" name="last_refresh_time" reporter:datatype="timestamp"/>
13058                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
13059                         <field reporter:label="Maximum Items" name="max_items" reporter:datatype="int" oils_obj:required="true"/>
13060                 </fields>
13061                 <links>
13062                         <link field="type" reltype="has_a" key="id" map="" class="cct"/>
13063                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13064                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
13065                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
13066                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
13067                 </links>
13068                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13069                         <actions>
13070                                 <create permission="ADMIN_CAROUSEL" context_field="owner"/>
13071                                 <retrieve permission="ADMIN_CAROUSEL" context_field="owner"/>
13072                                 <update permission="ADMIN_CAROUSEL" context_field="owner"/>
13073                                 <delete permission="ADMIN_CAROUSEL" context_field="owner"/>
13074                         </actions>
13075                 </permacrud>
13076         </class>
13077
13078         <class id="ccou" 
13079                 controller="open-ils.cstore open-ils.pcrud"
13080                 oils_obj:fieldmapper="container::carousel_org_unit" 
13081                 oils_persist:tablename="container.carousel_org_unit" 
13082                 reporter:label="Carousels Visible at Library">
13083                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_org_unit_id_seq">
13084                         <field reporter:label="ID" name="id" reporter:datatype="id" />
13085                         <field reporter:label="Carousel" name="carousel" reporter:datatype="link"/>
13086                         <field reporter:label="Override Name" name="override_name" reporter:datatype="text"/>
13087                         <field reporter:label="Library" name="org_unit" reporter:datatype="link"/>
13088                         <field reporter:label="Sequence Number" name="seq" reporter:datatype="int"/>
13089                 </fields>
13090                 <links>
13091                         <link field="carousel" reltype="has_a" key="id" map="" class="cc"/>
13092                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13093                 </links>
13094                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13095                         <actions>
13096                                 <create permission="ADMIN_CAROUSEL">
13097                                     <context link="carousel" field="owner" />
13098                                 </create>
13099                                 <retrieve permission="ADMIN_CAROUSEL">
13100                                     <context link="carousel" field="owner" />
13101                                 </retrieve>
13102                                 <update permission="ADMIN_CAROUSEL">
13103                                     <context link="carousel" field="owner" />
13104                                 </update>
13105                                 <delete permission="ADMIN_CAROUSEL">
13106                                     <context link="carousel" field="owner" />
13107                                 </delete>
13108                         </actions>
13109                 </permacrud>
13110         </class>
13111
13112         <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">
13113                 <fields oils_persist:primary="name">
13114                         <field name="name"              reporter:datatype="text"     reporter:label="Name" oils_obj:required="true"/>
13115                         <field name="description"       reporter:datatype="text"     reporter:label="Description"/>
13116                         <field name="context_org"       reporter:datatype="org_unit" reporter:label="Context Org" oils_obj:required="true"/>
13117                         <field name="enabled"           reporter:datatype="bool"     reporter:label="Enabled"/>
13118                         <field name="perm"              reporter:datatype="link"     reporter:label="Permission Required by User" oils_obj:required="true"/>
13119                         <field name="restrict_to_org"   reporter:datatype="bool"     reporter:label="Restrict by Home Library"/>
13120                         <field name="allow_inactive"    reporter:datatype="bool"     reporter:label="Allow Inactive Users"/>
13121                         <field name="allow_expired"     reporter:datatype="bool"     reporter:label="Allow Expired Users"/>
13122                         <field name="block_list"        reporter:datatype="text"     reporter:label="Block List"/>
13123                         <field name="usr_activity_type" reporter:datatype="link"     reporter:label="User Activity Type"/>
13124                 </fields>
13125                 <links>
13126                         <link field="context_org" reltype="has_a" key="id" map="" class="aou"/>
13127                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
13128                         <link field="usr_activity_type" reltype="has_a" key="id" map="" class="cuat"/>
13129                 </links>
13130                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13131                         <actions>
13132                                 <create permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13133                                 <retrieve permission="STAFF_LOGIN" context_field="context_org"/>
13134                                 <update permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13135                                 <delete permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13136                         </actions>
13137                 </permacrud>
13138         </class>
13139
13140         <!-- ********************************************************************************************************************* -->
13141 </IDL>
13142
13143 <!--
13144     vim:noet:ts=4:sw=4:
13145 -->